pip install torch,torchaudio出错解决?

pip install torch==1.4.0报错

ERROR: Could not find a version that satisfies the requirement torch==1.4.0 (from -r requirements.txt (line 9)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.4.0 (from -r requirements.txt (line 9))
  • 尝试下载torch的其他版本也没有解决,更换python版本也没有解决
pip install torch==1.4.0 -f https://download.pytorch.org/whl/torch_stable.html
  • 不可以使用下面的格式
pip install torch==1.4.0

pip install torchaudio==0.4.0报错

ERROR: Could not find a version that satisfies the requirement torchaudio==0.4.0 (from -r requirements.txt (line 10)) (from versions: none)
ERROR: No matching distribution found for torchaudio==0.4.0 (from -r requirements.txt (line 10))

依据提示没有0.4的版本,有0.6,0.7

按照提示安装新的版本

pip install torchaudio==0.6.0 -f https://download.pytorch.org/whl/torch_stable.html

下载后pip工具自动卸载了1.4版本的torch安装了1.6版本的torch,所以版本需要一致。

你可能感兴趣的:(pip install torch,torchaudio出错解决?)