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
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

南浔Pyer

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

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

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

打赏作者

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

抵扣说明:

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

余额充值