Could not find a version that satisfies the requirement torch==1.5.1+cpu报错已解决

报错如下

(tf2.0) [root@idalei FdWebsite]# pip install torch==1.5.1+cpu
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement torch==1.5.1+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1)
ERROR: No matching distribution found for torch==1.5.1+cpu

输入命令

 pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html

问题解决

(tf2.0) [root@idalei FdWebsite]# pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.5.1+cpu
  Downloading https://download.pytorch.org/whl/cpu/torch-1.5.1%2Bcpu-cp36-cp36m-linux_x86_64.whl (127.3 MB)
     |████████████████████████████████| 127.3 MB 38 kB/s 
Collecting torchvision==0.6.1+cpu
  Downloading https://download.pytorch.org/whl/cpu/torchvision-0.6.1%2Bcpu-cp36-cp36m-linux_x86_64.whl (5.7 MB)
     |████████████████████████████████| 5.7 MB 396 kB/s 
Requirement already satisfied: numpy in /root/anaconda3/envs/tf2.0/lib/python3.6/site-packages (from torch==1.5.1+cpu) (1.18.5)
Collecting future
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.2.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 15.9 MB/s 
Requirement already satisfied: pillow>=4.1.1 in /root/anaconda3/envs/tf2.0/lib/python3.6/site-packages (from torchvision==0.6.1+cpu) (8.0.1)
Building wheels for collected packages: future
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491058 sha256=78364355f891d729e9dbde329ab7114ecea8a97a17ab8688ed04b9f35241461f
  Stored in directory: /root/.cache/pip/wheels/f3/f6/70/8b2bba44d8bf6ee5b7eac561416d9ef5c28dd2320490fc0f1f
Successfully built future
Installing collected packages: future, torch, torchvision
^CERROR: Operation cancelled by user
(tf2.0) [root@idalei FdWebsite]# pip install torch==1.5.1+cpu torchvision==0.6.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Requirement already satisfied: torch==1.5.1+cpu in /root/anaconda3/envs/tf2.0/lib/python3.6/site-packages (1.5.1+cpu)
Collecting torchvision==0.6.1+cpu
  Using cached https://download.pytorch.org/whl/cpu/torchvision-0.6.1%2Bcpu-cp36-cp36m-linux_x86_64.whl (5.7 MB)
Requirement already satisfied: numpy in /root/anaconda3/envs/tf2.0/lib/python3.6/site-packages (from torch==1.5.1+cpu) (1.18.5)
Requirement already satisfied: future in /root/anaconda3/envs/tf2.0/lib/python3.6/site-packages (from torch==1.5.1+cpu) (0.18.2)
Requirement already satisfied: pillow>=4.1.1 in /root/anaconda3/envs/tf2.0/lib/python3.6/site-packages (from torchvision==0.6.1+cpu) (8.0.1)
Installing collected packages: torchvision
Successfully installed torchvision-0.6.1+cpu
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
根据提供的引用内容,有几种解决方案来解决 "ERROR: Could not find a version that satisfies the requirement torch==1.5.1 cu101" 的问题。 一种解决方案是执行以下命令安装torch的指定版本:pip install --user torch==1.3.0 -f https://download.pytorch.org/whl/torch_stable.html。然而,有用户反馈此方法并没有解决问题。 另一种解决方案是重新创建一个Python版本为3.7的虚拟环境,并安装torch的1.3.1版本。可以使用以下命令来完成这个过程:conda create -n uof python==3.7 pip install torch~=1.3.0。 此外,可以前往https://download.pytorch.org/whl/torch_stable.html,从官方网站下载torch的稳定版本安装包并手动安装。 最后,根据错误提示,如果你的电脑是64位的,并且官方提供的安装包只有32位的,那么你需要选择与你的python版本相对应的选项进行安装。例如,如果你使用的是64位的Python 3.5版本,你需要选择64位的安装选项进行安装。<span class="em">1</span><span class="em">2</span><span class="em">3</span><span class="em">4</span> #### 引用[.reference_title] - *1* *2* *3* [ERROR: Could not find a version that satisfies the requirement torch==1.3.0解决方案](https://blog.csdn.net/dream6985/article/details/127305278)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *4* [Could not find a version that satisfies the requirement PIL (from versions: ) No matching distribu](https://download.csdn.net/download/weixin_38722721/13750519)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南浔Pyer

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值