【发布时间】:2020-07-11 15:02:01
【问题描述】:
我应该在 Python 2.7 中运行我的代码。我想在 Python 2.7 中安装 Torch,但是当我运行这段代码时,它给了我错误:
代码:
pip install torch==1.3.1+cpu torchvision==0.4.2+cpu -f https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.3.1+cpu
还有这段代码:
pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Error: Could not find a version that satisfies the requirement torch==1.4.0+cpu
有人可以帮助我吗? 太感谢了。
【问题讨论】:
-
什么操作系统?您应该知道 Python 2 已停产,因此使用它时 htings 可能会中断,也可能不会中断。
-
请提供您的操作系统信息。也尝试将
-f https://download.pytorch.org/whl/torch_stable.html传递给pip -
感谢您的回复。这是我的操作系统:Windows-10-10.0.18362 以及你写的 pass -f ...,其实我不明白你在说什么。
标签: python python-2.7 pip torch torchvision