怎么装合适的GPU版本的torch
比如想装torch==1.13.1
直接用清华源镜像会安装对应的CPU版本,找清华源的GPU版本又麻烦!
可以先用官网网址,虽然下载很慢但是在安装过程中给出了下载的地址
bash
pip install torch==1.13.1+cu116 -f https://download.pytorch.org/whl/torch_stable.html
bash
pip install torchvision==0.14.1+cu116 -f https://download.pytorch.org/whl/torch_stable.html
bash
pip install torchvision==0.14.1+cu116 -f https://download.pytorch.org/whl/torch_stable.html
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torchvision==0.14.1+cu116
Downloading https://download.pytorch.org/whl/cu116/torchvision-0.14.1%2Bcu116-cp39-cp39-win_amd64.whl (4.8 MB)
https://download.pytorch.org/whl/cu116/torchvision-0.14.1%2Bcu116-cp39-cp39-win_amd64.whl
然后将地址粘贴到谷歌浏览器中直接下载
最后离线安装