首页 > 解决方案 > 如何在 Windows 10 上安装支持 CUDA 的 pytorch 1.2.0?

问题描述

我正在尝试在带有 Python 3.9 的 Windows 10 上安装支持 CUDA 的 pytorch 1.2.0,但它一直出错。

例如,我做pip install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch

并得到:

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'pytorch'

有任何想法吗?谢谢你。

标签: pythoninstallationpippytorch

解决方案


我的答案:

pip install wheel

然后使用此处的版本链接: https ://www.python.org/downloads/release/python-370/

例如,如果您想要 Python 3.7 Windows 的 1.1.0,请执行以下操作:

pip install https://download.pytorch.org/whl/cu100/torch-1.1.0-cp37-cp37m-win_amd64.whl

谢谢你们


推荐阅读