我正在尝试在 Windows 上安装 Pytorch,我正在使用官方网站 https://pytorch.org/get-started/locally/ 的命令
pip3 install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
如果我选择 Windows、Cuda 10.0 和 Python 3.7,这是命令但是如果我运行它,我会收到错误消息:
ERROR: Could not find a version that satisfies the requirement torch==1.2.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.2.0
那么为什么会这样呢?我的pip是19.2版本,我在新安装的python 3.7环境
原文由 relot 发布,翻译遵循 CC BY-SA 4.0 许可协议
您的问题最可能的原因是安装了 32 位 python,而火炬库依赖于 64 位版本。我有完全相同的问题。
只需从命令行启动
python
并观察我的安装现在显示 64 位。如果 Yours 显示 32,则安装 64 位 python。我使用了这个链接: Official python 64-bit Windows installer