如何解决使用 pip 在 Python 3.8.5 上安装 Pytorch 的问题
我正在尝试使用以下命令在 python 3.8.5 Windows 10 机器上安装 Pytorch:
pip install torch===1.7.0 -f https://download.pytorch.org/whl/torch_stable.html
和
pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
但我总是收到此错误:
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.7.0
有什么建议吗?
解决方法
要安装 cuda
试试这个:
pip install torch==1.7.0+cu110 -f https://download.pytorch.org/whl/torch_stable.html
要仅为 cpu
安装,请尝试以下方法:
pip install torch==1.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
您可以轻松找到所有其他选项 here。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。