找不到满足要求的版本 torch==1.7.0+cpu

时间:2021-03-29 16:50:09

标签: pytorch

我想从 requirements.txt 安装 torch==1.7.0+cpu 我有一个错误

<块引用>

找不到满足要求的版本 torch==1.7.0+cpu(来自 -r requirements.txt(第 42 行))(来自版本: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) 没有找到与 torch==1.7.0+cpu 匹配的分布

我正在使用

Python 3.6.12 (default, Aug 18 2020, 02:08:22) 
[GCC 5.4.0 20160609] on linux

2 个答案:

答案 0 :(得分:1)

这个命令帮助了我

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

答案 1 :(得分:1)

对于 CPU,您可以运行:

conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cpuonly -c pytorch

或用于 GPU:

pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html

检查此链接:

https://pytorch.org/get-started/previous-versions/