一.安装

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. 链接加载文件gcc __attribute__ section

    在阅读源代码的过程中,发现一个头文件有引用: /** The address of the first device table entry. */ extern device_t devices[] ...

  2. Perl语言入门--3--文件读取与写入

    现有文件test.txt,内容为:"123\n456" 1,打开文本test.txt #!/usr/bin/perl open d,"test.txt"; d ...

  3. HashMap/Hashtable/ConcurrentHashMap区别

    HashMap:每个隔间都没锁门,有人想上厕所,管理员指给他一个隔间,里面没人的话正常用,里面有人的话把这个人赶出来然后用. 优点,每个人进来不耽误都能用:缺点,每一个上厕所的人都有被中途赶出来的危险 ...

  4. 多个springboot项目部署在同一tomcat上,出现jmx错误

    多个springboot项目部署在同一tomcat上,出现jmx错误 原因:因为jmx某些东西重复,禁用jmx就可以了 endpoints.jmx.unique-names=true

  5. [译]Java8的函数式接口

    Java8引入了 java.util.function 包,他包含了函数式接口,具体的描述在以下api说明文档中: 函数式接口为lambda表达式和方法引用提供目标类型.每个函数式接口有一个单独的抽象 ...

  6. 一次 select for update 的悲观锁使用引发的生产事故

    1.事故描述 本月 8 日上午十点多,我们的基础应用发生生产事故.具体表象为系统出现假死无响应.查看事发时间段的基础应用 error 日志,没发现明显异常.查看基础应用业务日志,银行结果处理的部分普遍 ...

  7. Mysql缺少可执行的命令

    MySQL问题解决:-bash:mysql:command not found 问题:       [root@linux115 /]# mysql -uroot -p        -bash: m ...

  8. poj 1269(两条直线交点)

    Intersecting Lines Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 13481   Accepted: 59 ...

  9. Java多态机制和继承中重写重载

    关于Java中多态机制 http://www.cnblogs.com/chenssy/p/3372798.html 这篇博文讲的很透彻 大体意思是 多态定义: 多态就是指程序中定义的引用变量所指向的具 ...

  10. 【NOIP2007】字符串展开解题报告

    描述 Description 在初赛普及组的“阅读程序写结果”的问题中,我们曾给出一个字符串展开的例子:如果在输入的字符串中,含有类似于“d-h”或“4-8”的子串,我们就把它当作一种简写,输出时,用 ...