先上结果图我是直接安装1.4会报错,然后在在网上找了很多方法。大概就是先安装了torch1.3.1,然后再直接安装torch1.4.0就可以了。
具体步骤:
1.pip install torch==1.3.1 -f https://download.pytorch.org/whl/torch_stable.html
2.pip install torchvision==0.4.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
3.pip install torch1.4.0+cpu torchvision0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn
参考文章:
https://blog.youkuaiyun.com/samsarange/article/details/105149785
https://blog.youkuaiyun.com/qq_33749437/article/details/104133187