Installing TensorRT on Orin NX without docker

Hey,
have been trying to install tensorrt on the new Orin NX 16 GB. I am using Jetpack 5.1. Although the jetpack comes with the tensorrt libraries and can be installed using those, i am unable to install it’s Python APIs.

Jetpack: 5.1 which includes CUDA 11.4, TensorRT 8.5.2, cuDNN 8.6.0 and VPI 2.2
Python: 3.8
Running this in a conda env. Can share the environment.yml file to recreate the env.

Steps To Reproduce

Started with: $ pip install tensorrt_libs

"
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “/tmp/pip-install-0vapn2ox/tensorrt-libs_3fc61b4addab4290925137477c5d20f8/setup.py”, line 137, in
raise RuntimeError(open(“ERROR.txt”, “r”).read())
RuntimeError:
###########################################################################################
The package you are trying to install is only a placeholder project on PyPI.org repository.
This package is hosted on NVIDIA Python Package Index.

  This package can be installed as:
  ```
  $ pip install --extra-index-url https://pypi.nvidia.com tensorrt-libs
  ```
  ###########################################################################################
  
  [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.
"
In trying to figure out, tried:

  1. pip install python3-libnvinfer

raised error->
"ERROR: Could not find a version that satisfies the requirement python3-libnvinfer (from versions: none)
ERROR: No matching distribution found for python3-libnvinfer
"
2. Got to know that, some packages are typically provided through the NVIDIA package manager, which is specific to the JetPack version.

Tried: Adding the NVIDIA Repo key using the command,
wget https://developer.download.nvidia.com/embedded/L4T/r32_Release_v6.1/jetson-ota-public.asc

got the error->
"Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|152.199.39.144|:443… connected.
HTTP request sent, awaiting response… 404 Not Found
2023-06-21 15:24:12 ERROR 404: Not Found.
"
Let me know if these steps are correct, or if i need to correct some command. I am still stuck in this, so any help would be great. Also, let me know if you guys need any additional data.

1 Like

Hi,

We are moving this post to the Jetson Orin NX forum to get better help.

Thank you.

Yes, you should just be able to do sudo apt-get install python3-libnvinfer-dev to install the TensorRT Python bindings from JetPack. These JetPack apt repos should already be active on your device after it’s flashed with SDK Manager.

Try this URL instead: https://repo.download.nvidia.com/jetson/jetson-ota-public.asc

You should have an /etc/apt/sources.list.d/nvidia-l4t-apt-source.list file that looks like this for JetPack 5.1 (L4T R35.2.1)

deb https://repo.download.nvidia.com/jetson/common r35.2 main
deb https://repo.download.nvidia.com/jetson/t234 r35.2 main

or like this for JetPack 5.1.1 (L4T R35.3.1)

deb https://repo.download.nvidia.com/jetson/common r35.3 main
deb https://repo.download.nvidia.com/jetson/t234 r35.3 main

If /etc/apt/sources.list.d/nvidia-l4t-apt-source.list doesn’t exist for you, try creating it from the above. Then you should be able to run sudo apt-get update and list/install the NVIDIA JetPack packages.

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