PyTorch Import Error on Jetson AGX Orin: libcudnn.so.9 Not Found with JetPack 6.2.1 & CUDA 12.6

I’m running JetPack 6.2.1 (CUDA 12.6) on Jetson AGX Orin 64GB.
PyTorch installs successfully from multiple sources, but fails at runtime.

After installation, importing PyTorch throws this error:


>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fyp-agx/.local/lib/python3.10/site-packages/torch/_init_.py", line 422, in <module>
    from torch._C import *  # noqa: F403
ImportError: /usr/lib/aarch64-linux-gnu/libcudnn.so.9: version `libcudnn.so.9' not found (required by /home/fyp-agx/.local/lib/python3.10/site-packages/torch/lib/libtorch_python.so)
>>>

It seems like a cuDNN version mismatch — PyTorch is expecting cuDNN 9, but JetPack either ships with a different cuDNN version or the library path isn’t resolved correctly.

If anyone has a working PyTorch + CUDA 12.6 setup on JetPack 6.2.1, or knows the correct cuDNN/PyTorch build combo for AGX Orin, I’d really appreciate the guidance.

Hi,

JetPack 6.2.1 contains cuDNN 9.3.0.

Which PyTorch package do you install?
Please try our prebuilt, which is built for the JetPack 6.2:

Thanks.

Yeah, I have tried downloading from there but still it presents the same error as

import torch
Traceback (most recent call last):
File “”, line 1, in
File “/home/fyp-agx/.local/lib/python3.10/site-packages/torch/init.py”, line 422, in
from torch._C import * # noqa: F403
ImportError: /usr/lib/aarch64-linux-gnu/libcudnn.so.9: version `libcudnn.so.9’ not found (required by /home/fyp-agx/.local/lib/python3.10/site-packages/torch/lib/libtorch_python.so)

The installation completed perfectly with no errors. but during import torch the error. But during import torch, the error remaines same.

Hi,

Could you check if cuDNN is well installed in your environment first?
On JetPack 6.2.1, you should see the package in the below path:

$ ll /usr/lib/aarch64-linux-gnu/libcudnn.so.9
lrwxrwxrwx 1 root root 17 Jul 30  2024 /usr/lib/aarch64-linux-gnu/libcudnn.so.9 -> libcudnn.so.9.3.0

Thanks.

I checked if cuDNN is well installed and the output is as

lrwxrwxrwx 1 root root 17 Jul 30 2024 /usr/lib/aarch64-linux-gnu/libcudnn.so.9 → /usr/lib/aarch64-linux-gnu/libcudnn_ops.so.9.3.0