pytorch官网:https://pytorch.org/
选择对应版本
建议使用 pip 安装
加上国内源,注意国内源一定要是https域名的,很多博客的都是http的,都没用,弄了我一晚上,坑爹。
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:https://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:https://pypi.hustunique.com/
山东理工大学:https://pypi.sdutlinux.org/
豆瓣:https://pypi.douban.com/simple/
pip install torch===1.5.0 torchvision===0.6.0 -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.douban.com/simple/ some-package
成功