来源:https://blog.csdn.net/Miaosh999/article/details/104322336

最初在控制台上输入

pip install torchvision

结果报错

ERROR: Could not find a version that satisfies the requirement torch==1.4.0 (from torchvision) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.4.0 (from torchvision)

解决方法

更改torch版本(上面出错原因为torch版本不匹配,应为1.4.0),输入如下

pip install torch==1.4.0 -f https://download.pytorch.org/whl/torch_stable.html

需要一定的下载时间,等下载完成后,再输入

pip install torchvision

这样安装已经完成了,可以在python控制台上测试一下import torch检查是否安装成功。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-11-29
  • 2021-09-23
  • 2021-07-07
  • 2021-08-09
  • 2022-12-23
猜你喜欢
  • 2021-05-12
  • 2022-12-23
  • 2021-07-09
  • 2021-11-08
  • 2021-08-26
  • 2021-07-17
  • 2021-08-09
相关资源
相似解决方案