簡體   English   中英

如何在 Python 2.7 中安裝 Torch

[英]How to install Torch in Python 2.7

我應該在 Python 2.7 中運行我的代碼。 我想在 Python 2.7 中安裝火炬,但是當我運行此代碼時,它給了我錯誤:

代碼:

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 -m pip install torch torchvision --user

但是,如果您絕對需要問題中列出的版本,則可以嘗試從源代碼安裝

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM