Install pytorch with Cuda 12.1

Then there must be something I’m doing wrong because for me, it is not compatible. I’m getting the error:

RuntimeError:
      The detected CUDA version (12.1) mismatches the version that was used to compile
      PyTorch (11.8). Please make sure to use the same CUDA versions.

I have the nvidia drivers 530.30.02 with CUDA 12.1. I’m currently following the installation options of NerfStudio.

Their install instructions are:
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118

And the error happens when I try to install
pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

2 Likes