I install pytorch by .whl file, but torch.version.cuda does not match the whl cuda version. Can anyone help me?

I have installed torch from whl, downloads from pytorch.org

pip install torch-1.10.2+cu111-cp37-cp37m-linux_x86_64.whl

But when I check the torch cuda version by

torch.version.cuda

it returns 10.2. But I install cu111 version. What’s wrong?

Most likely you have multiple PyTorch installations in your current environment. Uninstall them all and reinstall the right wheel or create a new virtual environment where you could install the desired wheel.

Thanks a lot. I really have another pytorch installation.