CUDA for Jetson Xavier NX

Hello guys,

I can’t install CUDA for Jetson Xavier Nx. I get an error like this and have been struggling for days.


It looks like your environment is still Ubuntu 18.04 (JetPack 4?).
You will need to upgrade to JetPack 5 before installing the CUDA 12.


How do I install a CUDA version compatible with torch>=1.7.0,!=1.12.0torchvision>=0.8.1,!=0.13.0 for jetson xavier nx?

@eminnguney if you are on JetPack 4, you can use the default version of CUDA that comes with JetPack and install the PyTorch <= 1.10 wheels for JetPack 4 from this thread:

JetPack 4.4 (L4T R32.4.3) / JetPack 4.4.1 (L4T R32.4.4) / JetPack 4.5 (L4T R32.5.0) / JetPack 4.5.1 (L4T R32.5.1) / JetPack 4.6 (L4T R32.6.1)

Even on JetPack 5, it is not required to upgrade the CUDA version to CUDA 12 for PyTorch, it is built against the default version of CUDA that comes with JetPack already. If you are using the SD card image for Xavier NX, the CUDA Toolkit will have already been installed under /usr/local/cuda. Otherwise, SDK Manager can install it for you or you should just be able to do sudo apt-get install cuda-toolkit-*

Alternatively, if you continue having issues you can use the l4t-pytorch container which comes with PyTorch and torchvision pre-installed.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.