@Ubuntu16.0.4,Cuda9.0环境下安装pytorch1.0
遇到有些开源代码需要使用pytorch1.0,而自己的linux系统只安装了Cuda9.0,试了好几次用pytorch官网上的命令都不行,最后用下面的命令解决了。
pip install torch == 1.0.1 torchvision == 0.2.2 -f https://download.pytorch.org/whl/cu90/torch_stable.html
通用命令:
pip install torch == 版本号 torchvision = =版本号 -f 下载地址
不同的Cuda对应的下载地址为:
https://download.pytorch.org/whl/cpu/torch_stable.html # CPU-only build
https://download.pytorch.org/whl/cu80/torch_stable.html # CUDA 8.0 build
https://download.pytorch.org/whl/cu90/torch_stable.html # CUDA 9.0 build
https://download.pytorch.org/whl/cu92/torch_stable.html # CUDA 9.2 build
https://download.pytorch.org/whl/cu100/torch_stable.html # CUDA 10.0 build