PyTorch 安装错误 - 找不到满足要求的版本

时间:2021-03-30 07:50:35

标签: pytorch

你好!我一直在尝试安装 PyTorch,但到目前为止我得到的只是错误消息。我试过命令行

pip install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

这是在教程中给出的,我得到了错误:

ERROR: Could not find a version that satisfies the requirement torch==1.8.1+cpu
ERROR: No matching distribution found for torch==1.8.1+cpu

后来我尝试将命令简化为仅 “pip install torch”,这导致:

ERROR: Command errored out with exit status 1:
ModuleNotFoundError: No module named ‘tools.nnwrap’
ERROR: Failed building wheel for torch
...
Running setup.py clean for torch
ERROR: Command errored out with exit status 1:
ERROR: Failed cleaning build dir for torch

如果你能帮助我,我会很高兴,谢谢!

1 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,但这是因为我的互联网连接。您能否确认您有权访问此 URL

如果没问题,可能是因为你的 Python 版本。你在哪个版本? PyTorch 1.8.1 仅适用于 python 3.6+,不再支持 3.5 及以下版本。