[英]How to install Torch in Python 2.7
I should run my code in Python 2.7.我应该在 Python 2.7 中运行我的代码。 I want to install torch in Python 2.7 but when I ran this code it gives me the errors:
我想在 Python 2.7 中安装火炬,但是当我运行此代码时,它给了我错误:
code:代码:
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
And also for this code:还有这个代码:
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
Can anybody help me?有谁能够帮助我? Thank you so much.
非常感谢。
Try without precising the version:尝试不精确版本:
python -m pip install torch torchvision --user
But if you absolutely need the versions outlined in your question, you can try to install from source但是,如果您绝对需要问题中列出的版本,则可以尝试从源代码安装
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.