Jetson Xavier with installed TensorRT, code in Anaconda environment output "No module named 'tensorrt'"

Hello, I have just ran the command:

sudo apt install nvidia-tensorrt

to install TensorRT on my Jetson Xavier.
When run the code with the system default python3.6.9,

import tensorrt

is fine, and when running the code in conda environment, it throws the error:

ModuleNotFoundError: No module named ‘tensorrt’

Is there any thing I need to do to link the system TensorRT to conda environment?


This looks like a Jetson issue. Please refer to the below samples in case useful.

For any further assistance, we will move this post to to Jetson related forum.


Thanks, I will take a look!