码迷,mamicode.com
首页 > 其他好文 > 详细

pytorch安装

时间:2017-10-03 20:39:04      阅读:358      评论:0      收藏:0      [点我收藏+]

标签:sci   span   instead   get   usr   pack   install   space   ide   

环境:ubuntu16.04

(1) install python3

16.04 里面默认安装了python2.7 和3.5

sudo update-alternatives –install /usr/bin/python python /usr/bin/python2 100

sudo update-alternatives –install /usr/bin/python python /usr/bin/python3 150 

如果想要改回Python2 执行如下命令 
sudo update-alternatives –config python 
按照提示输入选择数字回车即可。 

(2) install pip3

sudo apt-get install python3-pip

如果报错"Unable to locate package python3-pip"

前面加一行:

sudo apt-get update

(3) install numpy, scipy, matplotlib

pip3 install numpy

pip3 install scipy

pip3 install matplotlib

(4) install pytorch

pip3 install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl 
pip3 install torchvision

RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).
    
Please follow the instructions at http://pytorch.org/ to install with miniconda instead.

(5) anaconda pytorch

 

pytorch安装

标签:sci   span   instead   get   usr   pack   install   space   ide   

原文地址:http://www.cnblogs.com/shadowwalker9/p/7624356.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!