转载:window安装torchvision失败

来源: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检查是否安装成功。

posted @ 2020-08-28 22:00  Wreng  阅读(756)  评论(0编辑  收藏  举报