尝试安装最新的Pytorch(1.13.1),实际安装的是1.11.0。

huangapple go评论70阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月24日 06:16:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75550882.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定