一.安装

1. 官方github:https://github.com/pytorch/pytorch

Install optional dependencies //安装依赖项

On Linux

export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" # [anaconda root directory]

# Install basic dependencies
conda install numpy pyyaml mkl setuptools cmake cffi # Add LAPACK support for the GPU
conda install -c pytorch magma-cuda80 # or magma-cuda90 if CUDA 9

CondaError: CondaHTTPError When conda install -c soumith magma-cuda80=2.1.0 #1214

conda install magma-cuda80 -c soumith
 

- 出现网络错误

Downloading and Extracting Packages
certifi 2018.1.: ##################################################### | %
magma-cuda80 2.2.: | % CondaHTTPError: HTTP CONNECTION FAILED for url <https://conda.anaconda.org/pytorch/linux-64/magma-cuda80-2.2.0-h39f1f8d_1.tar.bz2>
Elapsed: - An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

- 根据:Previous Versions

Installation instructions and binaries for previous PyTorch versions may be found on our website.

Installing with CUDA 

conda install pytorch=0.1. cuda80 -c soumith

- 安装成功,但是运行出错

Downloading and Extracting Packages
cuda80 1.0: ############################################################ | %
libgcc 7.2.: ########################################################## | %
pytorch 0.1.: ######################################################## | %
libtorch 0.1.: ####################################################### | %
openblas 0.2.: ####################################################### | %
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
dsp@dsp:~$ python
Python 2.7. |Anaconda custom (-bit)| (default, Oct , ::)
[GCC 7.2.] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
File "<stdin>", line , in <module>
File "/home/dsp/anaconda2/lib/python2.7/site-packages/torch/__init__.py", line , in <module>
from torch._C import *
ImportError: /home/dsp/anaconda2/lib/python2./site-packages/torch/_C.so: undefined symbol: _ZN4thpp10THCSTensorIlEC1EP8THCStateP14THCSLongTensor 重新安装:conda install pytorch torchvision cuda80 -c soumith 后报错
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dsp/anaconda2/lib/python2.7/site-packages/torch/__init__.py", line 53, in <module>
    from torch._C import *
ImportError: libiomp5.so: cannot open shared object file: No such file or directory conda's anaconda channel packaging is faulty #2091:ImportError: libiomp5.so: cannot open shared object file

二.入门

此教程为翻译官方地址

Github 地址
简书地址
CSDN地址

作者:Soumith Chintala

Ubuntu16.04安装Pytorch的更多相关文章

  1. ubuntu16.04安装jdk,tomcat

    ubuntu16.04安装jdk,tomcat 最近装了一下tomcat,网上的教程很多,我也试了很多次,但是有一些教程关于tomcat配置是错误的,让我走上了歧途.差点重装系统,还好王总及时出手帮助 ...

  2. Ubuntu16.04 安装openjdk-7-jdk

    Ubuntu16.04 安装openjdk-7-jdk sudo apt-get install openjdk-7-jre 或者sudo apt-get install openjdk-7-jdk ...

  3. Ubuntu16.04安装GTK3主题:OSX-Arc

    Ubuntu16.04安装GTK3主题:OSX-Arc GTK3主题:OSX-Arc描述: 前几个月,Gnome3.20升3.22的时候,出现了大量主题崩溃的现象,其中包括Arc.Flatabulou ...

  4. Ubuntu16.04安装opencv for python/c++

    Ubuntu16.04安装opencv for python/c++ 网上关于opencv的安装已经有了不少资料,但是没有一篇资料能让我一次性安装成功,因此花费了大量时间去解决各种意外,希望这篇能给一 ...

  5. ubuntu16.04安装不上有道词典的解决办法

    转自:http://www.linuxdiyf.com/linux/21143.html ubuntu16.04安装不上有道词典,提示: le@hu-pc:~/下载$ sudo dpkg -i you ...

  6. Ubuntu16.04安装mongodb

    Ubuntu16.04安装mongodb copy from: http://blog.csdn.net/zhushh/article/details/52451441 1.导入软件源的公钥 sudo ...

  7. 【Tools】ubuntu16.04安装搜狗输入法

    Ubuntu16,04 安装搜狗输入法 1.下载搜狗输入法的安装包 下载地址为:http://pinyin.sogou.com/linux/ 2.按键Ctr+Alt+T打开终端,输入以下命令切换到下载 ...

  8. Ubuntu16.04安装cuda9.0+cudnn7.0

    Ubuntu16.04安装cuda9.0+cudnn7.0 这篇记录拖了好久,估计是去年6月份就已经安装过几遍,然后一方面因为俺比较懒,一方面后面没有经常在自己电脑上跑算法,比较少装cuda和cudn ...

  9. Ubuntu16.04安装TensorFlow及Mnist训练

    版权声明:本文为博主原创文章,欢迎转载,并请注明出处.联系方式:460356155@qq.com TensorFlow是Google开发的开源的深度学习框架,也是当前使用最广泛的深度学习框架. 一.安 ...

随机推荐

  1. 用Golang自己构造ICMP数据包

    ICMP是用来对网络状况进行反馈的协议,可以用来侦测网络状态或检测网路错误. 限于当前Golang在网络编程方面的代码稀缺,资料甚少,所以分享一个用Golang来构造ICMP数据包并发送ping程序的 ...

  2. netsh winsock reset 命令并回车

    1. Win+R 打开运行窗口,输入 CMD 并确认打开命令行窗口.2. 在命令行窗口输入 netsh winsock reset 命令并回车,待提示重启计算机时,重启计算机

  3. POJ1019 Number Sequence

    Number Sequence Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 36256   Accepted: 10461 ...

  4. 热安装NGINX并支持多站点SSL

    https://www.moonfly.net/801.html http://www.centoscn.com/image-text/config/2015/0423/5251.html 1.查看n ...

  5. grep 所有多个关键字

    标签(空格分隔): Linux 多个关键字 或 关系 egrep 'CommentManager|getComment' --color catalina.log.2017-03-15 grep -E ...

  6. python算法:约瑟夫问题

    据说著名犹太历史学家 Josephus有过以下的故事:在罗马人占领乔塔帕特後,39 个犹太人与Josephus及他的朋友躲到一个洞中,39个犹太人决定宁愿死也不要被人抓到,于是决定了一个自杀方式,41 ...

  7. [xampp] /usr/bin/env: php: No such file or directory

    ln -s /opt/lampp/bin/php /usr/local/bin/php

  8. dart Stream

  9. Hadoop-eclipse插件配置

    1.准备jar包与安装eclipse. 2.将jar包拷贝到eclipse/plugin.

  10. 棋盘V

    问题 A: 棋盘V 时间限制: 1 Sec  内存限制: 128 MB提交: 150  解决: 3[提交] [状态] [讨论版] [命题人:] 题目描述 有一块棋盘,棋盘的边长为100000,行和列的 ...