Tensorrt not installing with pip


When I try to install tensorrt using pip in a python virtual environment, the setup fails and gives the following error:
ERROR: Failed building wheel for tensorrt.

Possible solutions tried

I have upgraded the version of the pip but it still doesn’t work.


TensorRT Version: 8.5
CUDA Version: 11.4
CUDNN Version: 8.6
Operating System + Version: Jetson 35.2
Python Version (if applicable): 3.8


We recommend that you please follow the installation guide and try the correct steps.

Thank you,

Hi. I did follow this. Apparently, the architecture of the ORIN device is aarch64. When I flashed the ORIN device, tensorrt was already installed but not accessible in a Python virtual environment. So I created the virtual environment with --system-site-packages option and now it’s able to access tensorrt. I found this solution here: How to install nvidia-tensorrt? - #7 by dusty_nv

I am getting the same errors with tensorrt, but how do I apply the :–system-site-packages you wrote for the solution?

First check if tensorrt exists in your python 3.8 dist packages on your Linux machine.
The directory will be something like this: usr/lib/python3.8/dist-packages

So when you use mkdirvirtualenv to create a new virtual environment, add --system-site-packages as an option.
Something like this: mkdirvirtualenv venv --system-site-packages

So it will create a new virtual environment and have its own packages but will also use the packages found in the usr/lib/python3.8/dist-packages directory. Usually, tensorrt python package is there after you flash the ORIN device. So it should work.

thank you

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