Can not install torchvision 0.5.0 using conda

I used the command on the pytorch website.

# CUDA 10.1
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch

But it returned

PackagesNotFoundError: The following packages are not available from current channels:

  - torchvision==0.5.0

Any suggestions? Thank you!!!

It seems that you are trying to install PyTorch 1.4.0 and torchvision 0.5.0 with CUDA 10.1 support. It’s important to note that these are relatively old versions of PyTorch and torchvision. If you don’t specifically require these older versions, I recommend installing the latest versions instead.

For the latest PyTorch and torchvision versions with CUDA 10.1 support, you can use the following command:

conda install pytorch torchvision torchaudio -c pytorch -c conda-forge

However, if you still need to install the older versions (PyTorch 1.4.0 and torchvision 0.5.0) with CUDA 10.1 support, you can try the following command:

conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch -c conda-forge

By adding the -c conda-forge channel, you may have better luck finding the required packages. If you still encounter issues, consider creating a new conda environment and then installing the packages within that environment:

conda create -n myenv
conda activate myenv
conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.1 -c pytorch -c conda-forge

Remember to replace myenv with a name of your choice for the new conda environment.

I’m also trying to install those specific versions on Linux. It’s some old repo that has it as a dependency.

conda search torchvision -c pytorch -c conda-forge doesn’t list the 0.5 version.

I did it but got the same error. If i not describe specific version, I got CPU version torch and torchvision

I finally solve the problem by using pip instead of conda

pip install torch==1.4.0 torchvision==0.5.0
2 Likes