使用pip安装PyTorch时报如下错误:

ERROR: Could not find a version that satisfies the requirement torch>=1.6.0 (from -r requirements.txt (line 11)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)

ERROR: No matching distribution found for torch>=1.6.0 (from -r requirements.txt (line 11))

 

pip安装Pytorch时使用国内镜像源,会报如上错误。解决方案如下:

参考:https://blog.csdn.net/Jwenxue/article/details/107520422中给出的网址,选择合适的版本,根据给出的命令:

ERROR: Could not find a version that satisfies the requirement torch>=1.6.0 (from -r requirements.tx

比如:pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html

到网址:https://download.pytorch.org/whl/torch_stable.html选择合适的版本,使用迅雷下载,完成后再使用pip安装即可。

进入下载的whl文件目录,运行如下命令:

pip install "torch-1.6.0+cu101-cp38-cp38-win_amd64.whl" "torchvision-0.7.0+cu101-cp38-cp38-win_amd64.whl"

相关文章:

  • 2022-01-30
  • 2021-07-22
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-12-11
猜你喜欢
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2021-09-24
  • 2021-12-13
  • 2021-12-05
相关资源
相似解决方案