在安装torch时使用pip install torch***+cu***
时会报错找不到对应安装包错误。
网上一般解决方法是加镜像网站如pip install torch1.8.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
但是使用时会出现找不到包错误,但是进入网站是可以找到的。
解决方法是cuda对应版本不写,让pip先对网站进行索引再补全命令安装
如:pip install torch1.8.1+cu -f https://download.pytorch.org/whl/torch_stable.html
后使用pip install torch1.8.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
安装。