Linux python2.7安装pytorch CUDA8.0

一般不管是安装了conda还是没有conda,都建议直接用pip来安装。

附一个牛逼博主写的对应python版本和CUDA版本的pytorch连接:https://blog.csdn.net/li8zi8fa/article/details/75452000

一开始我的命令是:

pip install http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp27-none-linux_x86_64.whl 

然后下载到一半中断,提示:

ReadTimeoutError: HTTPConnectionPool(host='download.pytorch.org', port=80): Read timed out.

这一般是因为你所下载地址中途被墙了



解决办法:

给pip一个连接响应时间即可

修改后的命令为:

pip --default-timeout=100 install -U http://download.pytorch.org/whl/cu80/torch-0.1.12.post2-cp27-none-linux_x86_64.whl

直接在pip和install中间加一句 --default-timeout=100


若另外出现如下所示的安装错误,请转移到我的另一篇博客 https://blog.csdn.net/jiang_ming_/article/details/80984353

Could not install packages due to an EnvironmentError:

Consider using the `--user` option or check the permissions.



你可能感兴趣的:(python,Pytorch)