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

使用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中给出的网址,选择合适的版本,根据给出的命令:

比如: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"

  • 5
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值