找不到与torch==1.9.0+cu111相匹配的发行版。

3
我想在我的计算机上安装Codegen

使用virtualenv安装时,我遇到了以下错误:

pip3 install -r requirements.txt
Looking in links: https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.9.0+cu111 (from versions: 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0)
ERROR: No matching distribution found for torch==1.9.0+cu111

我也尝试使用conda安装库。但是,我遇到了以下错误:

CondaValueError: could not parse '--find-links https://download.pytorch.org/whl/torch_stable.html' in: requirements.txt

> cat requirements.txt
--find-links https://download.pytorch.org/whl/torch_stable.html
torch==1.9.0+cu111
transformers==4.16.2%

同样的问题出现在PyTorch中。 - sergzemsk
1个回答

1

我在安装一个wheel时遇到了问题。

我通过更改.whl文件来解决它。

在xxxx.whl/xxxxx.dist-info/METADATA中。

Requires-Dist: torch (==1.9.1+cu111)
Requires-Dist: torchvision (==0.10.1+cu111)

删除 '+cu111':

Requires-Dist: torch (==1.9.1)
Requires-Dist: torchvision (==0.10.1)

你的回答可以通过提供更多支持信息来改进。请编辑以添加进一步的细节,例如引用或文档,以便他人可以确认你的答案是正确的。您可以在帮助中心找到有关如何编写良好答案的更多信息。 - Community

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接