How to install tensorrt in jetpack 6.2

TensorRT does not currently build wheels for Tegra systems in conda environment.

"(gtp) vegaai@ubuntu:~/GTP/models/stt_model/whisper_trt$ pip install tensorrt
Collecting tensorrt
Using cached tensorrt-10.11.0.33.tar.gz (40 kB)
Preparing metadata (setup.py) … done
Collecting tensorrt_cu12==10.11.0.33 (from tensorrt)
Using cached tensorrt_cu12-10.11.0.33.tar.gz (18 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 35, in
File “/tmp/pip-install-37s6hrz5/tensorrt-cu12_c6ae4303797242c29e5b7a4494f8cd29/setup.py”, line 71, in
raise RuntimeError(“TensorRT does not currently build wheels for Tegra systems”)
RuntimeError: TensorRT does not currently build wheels for Tegra systems
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details."

Hi,

To install TensorRT on Tegra, you need specific Debian packages along with their dependencies already installed. You can use NVIDIA SDK Manager to install them, or simply download the package repo using SDK Manager and install it manually:

# Copy the file and log into the board
scp nv-tensorrt-local-tegra-repo-ubuntu2204-10.3.0-cuda-12.5_1.0-1_arm64.deb nvidia@<tegra-ip>:
ssh nvidia@<tegra-ip>

# Install the repo
sudo dpkg -i nv-tensorrt-local-tegra-repo-ubuntu2204-10.3.0-cuda-12.5_1.0-1_arm64.deb
# Copy the key to the keyrings folder (Not sure about the name on JP6.2)
sudo cp /var/nv-tensorrt-local-repo-l4t-10.3.0-cuda-12.5/<key>  /usr/share/keyrings/
#install tensorrt
sudo apt install tensorrt-libs tensorrt python3-libnvinfer python3-libnvinfer-dev 

To check if the python tensorrt package is already installed you can run:

apt list --installed | grep python3-libnvinfer-dev 

Edit:
You can try just the apt command first in case the tensorrt repo is already installed:

sudo apt install tensorrt-libs tensorrt python3-libnvinfer python3-libnvinfer-dev 
1 Like

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