Ubuntu16.04安装Pytorch
2017-11-01 16:48
141 查看
如果你的系统是Linux和OS X ,Pytorch的安装很简单,直接去官方网站http://pytorch.org/找命令就可以了。
(可能之前十分呆萌的没有看清楚,安装好了torch7科学计算库.哈哈哈.
安装torch7的教程在这里:http://blog.csdn.net/hungryof/article/details/51557666.)
一、Pytorch依赖库的安装
安装pytorch需要两个依赖库,pyyaml和numpy。
sudo pip install pyyaml
sudo pip install numpy
二、进行Pytorch的安装
笔者的是python 2.7 linux 没有安装cuda:
sudo pip install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl sudo pip install torchvision
# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp27-cp27m-manylinux1_x86_64.whl
安装时Terminal的提示:
Processing ./torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl
Requirement already satisfied: pyyaml in /usr/local/lib/python2.7/dist-packages (from torch==0.2.0.post3)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from torch==0.2.0.post3)
Installing collected packages: torch
在运行中碰到的问题,解决办法是更新numpy。
问题描述:
ImportError: numpy.core.multiarray failed to import
解决方法:
sudo pip install -U numpy
(可能之前十分呆萌的没有看清楚,安装好了torch7科学计算库.哈哈哈.
安装torch7的教程在这里:http://blog.csdn.net/hungryof/article/details/51557666.)
一、Pytorch依赖库的安装
安装pytorch需要两个依赖库,pyyaml和numpy。
sudo pip install pyyaml
sudo pip install numpy
二、进行Pytorch的安装
笔者的是python 2.7 linux 没有安装cuda:
sudo pip install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl sudo pip install torchvision
# if the above command does not work, then you have python 2.7 UCS2, use this command
pip install http://download.pytorch.org/whl/cu75/torch-0.2.0.post3-cp27-cp27m-manylinux1_x86_64.whl
安装时Terminal的提示:
Processing ./torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl
Requirement already satisfied: pyyaml in /usr/local/lib/python2.7/dist-packages (from torch==0.2.0.post3)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from torch==0.2.0.post3)
Installing collected packages: torch
在运行中碰到的问题,解决办法是更新numpy。
问题描述:
ImportError: numpy.core.multiarray failed to import
解决方法:
sudo pip install -U numpy
相关文章推荐
- Ubuntu16.04深度学习一键安装脚本(支持pytorch、tensorflow、keras、caffe)
- Ubuntu16.04下Pytorch安装(基于conda或pip)
- Ubuntu16.04下Pytorch安装(基于conda或pip)
- ubuntu 16.04+pytorch的安装
- Ubuntu 16.04 64位 安装NVIDIA驱动 CUDA9.1和PyTorch
- pytorch-0.2成功调用GPU:ubuntu16.04,Nvidia驱动安装以及最新cuda9.0与cudnnV7.0配置
- Ubuntu16.04 Python 3.6安装Pytorch 0.2
- Ubuntu16.04 Python 3.6安装Pytorch 0.2
- Ubuntu16.04环境下安装CUDA、cudnn、Caffe、Tensorflow、pytorch
- ubuntu16.04 pytorch 安装
- pytorch 在ubuntu16.04 下安装
- ubuntu16.04源码安装PyTorch
- Ubuntu16.04安装Pytorch
- ubuntu16.04+cuda8.0+python3.5_pip安装pytorch
- Ubuntu16.04 + cuda8.0 + GTX1080安装教程
- Ubuntu 16.04 安装Matlab R2015b
- 在Ubuntu-16.04安装Chrome、搜狗拼音输入法、网易云音乐
- Ubuntu 16.04 LTS 搜狗输入法安装
- Ubuntu16.04 安装Nvidia显卡