pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f
时间: 2023-09-30 21:09:54 浏览: 69
https://download.pytorch.org/whl/cu111/torch_stable.html
这条命令可以安装 PyTorch 1.9.0、CUDA 11.1、CuDNN 8.2.1 和 TorchVision 0.10.0,同时也安装了适用于 CUDA 11.1 的 PyTorch。如果你使用的是其他 CUDA 版本,可以将 `cu111` 替换为对应的版本号,例如 `cu102`。希望能对你有所帮助!
相关问题
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/cu111/torch_stable.html改成cuda11.4
如果你想安装的是CUDA 11.4版本的torch,可以使用以下命令:
```
pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/cu114/torch_stable.html
```
这个命令会安装torch、torchvision和torchaudio,其中包含了cudnn模块所需的依赖。请注意,这个命令会安装CUDA 11.4版本的torch,如果你的CUDA版本不是11.4,需要在链接中选择相应的版本进行安装。
No matching distribution found for torch==1.9.0+cu111
这个错误通常是由于找不到与你的CUDA版本匹配的PyTorch版本所致。 `cu111` 表示你正在使用CUDA 11.1版本,因此你需要安装与之兼容的PyTorch版本。
你可以尝试安装以下命令来获取与CUDA 11.1兼容的PyTorch版本:
```
pip install torch==1.9.0+cu111 -f https://download.pytorch.org/whl/cu111/torch_stable.html
```
如果你使用的是conda,则可以使用以下命令:
```
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=11.1 -c pytorch -c nvidia
```
注意,你需要确保你的系统上已经安装了CUDA 11.1。