当前位置:   article > 正文

pip 安装 pytorch环境_torch==2.0.1

torch==2.0.1

直接 pip install torch -i https://pypi.tuna.tsinghua.edu.cn/simple

 Building wheel for torch (setup.py) ... error
 ERROR: Failed building wheel for torch
  • 1
  • 2

失败

pip install --upgrade torch torchvision -i https://pypi.tuna.tsinghua.edu.cn/simple
  • 1

还是失败

ERROR: torchvision 0.5.0 has requirement torch==1.4.0, but you'll have torch 0.1.2.post2 which is incompatible.
  • 1

再次尝试

pip install --upgrade torch==1.4.0 torchvision==0.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
但是还是安装失败
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement torch==1.4.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.4.0
  • 1
  • 2
  • 3
  • 4
  • 5

最后找到一种新的方式:
https://pytorch.org/get-started/locally/
win10-pip-cpu

最后安装成功(还得看网速,在另一台笔记本上面就是超时了),注意是使用 pip install,而不是 conda install(安装失败)

pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
  • 1

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Li_阴宅/article/detail/756250
推荐阅读
相关标签
  

闽ICP备14008679号