Installed version is 1.11.0 but torch.version is 1.7.0

Hello everyone!

I installed PyTorch into a fresh Python 3.7 Anaconda environment using the provided command:

conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

OS: Ubuntu 20.04
nvidia Driver: 510.60.02
CUDA: not installed

When I import torch and print torch.__version__ it returns 1.7.0+cu101 and not 1.10.0.
When I print torch.cuda.version it returns 10.1 and not 11.3.
Running torch.cuda.is_avialable() returns True.

What’s going on with these version mismatches?
Is this just a bug or am I reaching out to the wrong variables?
I’m thankful for any clarifying insights!

You may want to see if there is another version of torch that is already installed and it is being selected first before the conda package (e.g., check the output of torch.__file__ to see the location of the module that is being imported).

1 Like

You are right! For some reason it referred to PyTorch to some python3.7 directory in home. Removing that directory resolved my issue. Thanks =)