I want to install the torch2trt Python module in a virtual environment on my Jetson Orin NX (JetPack 6.2.1+b38). I’m following the instructions from the official repo (GitHub - NVIDIA-AI-IOT/torch2trt: An easy to use PyTorch to TensorRT converter).
Before installation, I installed TensorRT and its development packages:
sudo apt-get update
sudo apt-get install tensorrt nvidia-tensorrt-dev python3-libnvinfer-dev
However, when I run:
python3 setup.py install
I get this error:
Traceback (most recent call last):
File "/home/jetson/torch2trt/setup.py", line 2, in <module>
import tensorrt
File "/usr/lib/python3.10/dist-packages/tensorrt/__init__.py", line 76, in <module>
from .tensorrt import *
ImportError: libcudla.so.1: cannot open shared object file: No such file or directory
I’ve searched online without success. I initially suspected a typo (libcuda.so vs. libcudla.so), and even added a symlink, but the error persists.
How can I fix this and install torch2trt successfully on my Jetson?