英文:
Trying to install the latest Pytorch (1.13.1) instead installs 1.11.0
问题
我尝试安装最新的PyTorch版本,但它一直试图安装1.11.0版本。我在运行Windows 10的Python 3.10.8上,同时安装了CUDA 11.6。
我正在运行以下命令:
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
即使我加上--no-cache-dir
标志,它仍然会下载1.11.0版本。运行以下命令:
pip install torch==1.13.1
会安装CPU版本。有没有办法可以直接下载特定模块并手动安装?
英文:
I'm trying to install the latest Pytorch version, but it keeps trying to instead install 1.11.0. I'm on Windows 10 running Python 3.10.8, and I have CUDA 11.6 installed.
I'm running the following command:
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
Even if I give it the flag --no-cache-dir, it proceeds to download 1.11.0 anyways. Running
pip install torch==1.13.1
Installs the CPU version. Any way that I can download the specific module directly and install it manually?
答案1
得分: 3
我弄清楚了。我运行了以下命令来具体安装我想要的版本:
pip install https://download.pytorch.org/whl/cu116/torch-1.13.1%2Bcu116-cp310-cp310-win_amd64.whl
你可以在这里找到所有可用的安装包。如果你遇到"UserWarning: Failed to load image Python extension"的问题,请确保同时安装Torchvision和PyTorch。
英文:
Figured it out. I ran the following command to specifically install the version I wanted:
pip install https://download.pytorch.org/whl/cu116/torch-1.13.1%2Bcu116-cp310-cp310-win_amd64.whl
You can find all the available wheels here. If you get involving "UserWarning: Failed to load image Python extension", make sure you also install Torchvision AT THE SAME TIME as PyTorch.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论