Libcudnn.so.8 error and OpenCV without CUDA

I have a Jetson Nano with ubuntu 22.04 (jetpack 6.2), installed python 3.10.12, and I’ve being stuck in import torch with this libcudnn.so.8 error when i was trying to write python code, could anyone help me with this? I am new to Jetson nano and I’m trying to get jetson-inference running, but nothing came out!

Logs are as follow:

import torch
Traceback (most recent call last):
File “”, line 1, in
File “/home/wheeltec/.local/lib/python3.10/site-packages/torch/init.py”, line 235, in
from torch._C import * # noqa: F403
ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory

Hi,

Could you try the PyTorch and OpenCV package from the below link:

https://pypi.jetson-ai-lab.dev/jp6/cu126

Thanks.

So I downloaded torch-2.6.0rc1-cp310-cp310-linux_aarch64.whl, and opencv_python-4.10.0-py3-none-any.whl. Both installations were successful and I tried import torch again and it worked, thanks!
Although I did not know why this error occurs, since I installed torch before. Does it have anything to do with some sort of jetson’s unique configurations?

Hi,

The PyTorch you tested previously is built with cuDNN v8.
But JetPack 6.2 includes cuDNN v9 already so it is not compatible.

Thanks.

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