TensorRT Installation

As far as i know that Tensorrt comes installed with jetpack5.1 when i have checked for tensorrt in the command it showed that it is not found /opt/nvidia$ python3
$ python3
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import tensorrt
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘tensorrt’
exit()

However when i run /opt/nvidia$ dpkg -l | grep nvinfer
ii libnvinfer-bin 8.5.2-1+cuda11.4 arm64 TensorRT binaries
ii libnvinfer-dev 8.5.2-1+cuda11.4 arm64 TensorRT development libraries and headers
ii libnvinfer-plugin-dev 8.5.2-1+cuda11.4 arm64 TensorRT plugin libraries
ii libnvinfer-plugin8 8.5.2-1+cuda11.4 arm64 TensorRT plugin libraries
ii libnvinfer-samples 8.5.2-1+cuda11.4 all TensorRT samples
ii libnvinfer8 8.5.2-1+cuda11.4 arm64 TensorRT runtime libraries

it shows that TensorRT 8.5.2 is installed.

How can i check if its correctly installed?

Hi,
Please refer to the installation steps from the below link if in case you are missing on anything

Also, we suggest you to use TRT NGC containers to avoid any system dependency related issues.

Thanks!

If I have CUDA 11.4 and want to install 8.5.2 where can I find the .tar file?

Hi,

Please try if below command works?

sudo apt install python3-libnvinfer*

Thanks

It wasn’t working but then i had to install TRT 8.5.2 for CUDA 11.8 while i’m using CUDA 11.4 and it caused a memory error when using DS.
I have deleted the above version but i need a way to install TRT 8.5.2 for CUDA 11.4

Hi,

Please also try the command above.
The TensorRT package for Jetson should be built with CUDA 11.4.

Do you really use Jetson Nano (since this is the Nano board)?
Only JetPack 4 can work on Jetson Nano. JetPack 5 requires Xavier or a newer device.

Thanks.

no i’m using jetson agx orin no idea why my topic is moved to jetson nano.
I have uninstalled tensorrt and now i can’t find TRT 8.5.2 compatible with CUDA 11.4 i can’t find the .tar file of it

Hi,

I will move your topic to the Orin board.

A simplest way is using OTA command:

$ sudo apt update
$ sudo apt install nvidia-jetpack

Thanks.

first command generated the below error:
E: The repository ‘file:/var/nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.5.1-ga-20220505 Release’ no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

and 2nd command generated:
E: Unable to correct problems, you have held broken packages.
ted the below:

Hi,

We can run the command without issue.

Could you share the complete log when running the sudo apt update?
Have you modified the /etc/apt/sources.list.d?

Thanks

jetson@ubuntu:~$ sudo apt update
[sudo] password for jetson:
Get:1 file:/var/cuda-tegra-repo-ubuntu2004-11-8-local InRelease [1,575 B]
Get:2 file:/var/cuda-tegra-repo-ubuntu2004-12-1-local InRelease [1,575 B]
Get:1 file:/var/cuda-tegra-repo-ubuntu2004-11-8-local InRelease [1,575 B]
Get:3 file:/var/nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.5.1-ga-20220505 InRelease
Ign:3 file:/var/nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.5.1-ga-20220505 InRelease
Get:4 file:/var/nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.5.1-ga-20220505 Release
Err:4 file:/var/nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.5.1-ga-20220505 Release
File not found - /var/nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.5.1-ga-20220505/Release (2: No such file or directory)
Get:2 file:/var/cuda-tegra-repo-ubuntu2004-12-1-local InRelease [1,575 B]
Get:5 https://repo.download.nvidia.com/jetson/common r35.2 InRelease [2,555 B]
Get:6 https://repo.download.nvidia.com/jetson/t234 r35.2 InRelease [2,547 B]
Hit:7 Index of /repos/code/ stable InRelease
Hit:8 Index of /ubuntu-ports focal InRelease
Hit:9 Index of /repos/vscode/ stable InRelease
Get:10 Index of /ubuntu-ports focal-updates InRelease [114 kB]
Hit:11 Index of /ubuntu-ports focal-backports InRelease
Hit:12 Index of /ubuntu-ports focal-security InRelease
Reading package lists… Done
E: The repository ‘file:/var/nv-tensorrt-repo-ubuntu2004-cuda11.4-trt8.2.5.1-ga-20220505 Release’ no longer has a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Hi,

It seems your environment is trying to access a desktop TensorRT package which is not available for Jetson.

Is reflashing an option for you?
If yes, it’s recommended to do so with SDKmanager to get a clean environment.

Thanks.

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