Jetson Nano TensorRT python import error

Hey,

I’m trying to import tensorrt in python on the jetson nano. I can verify that tensorrt exists in on the device

/usr/src/tensorrt

and that there is a python sample folder. Additionally pycuda is also installed in the .local directory

When I actually attempt to run the samples or my own scripts they always fail trying to import tensorrt due to it not existing in python3.6 dist-packages. The error looks like a typical python error for when it can’t find existing packages. Is there anything special I need to set in the path to point to tensorrt?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorrt'

Thanks in advance

Hi,

Do you setup the device with sdkmanager?
We have verified that TensorRT can be correctly imported with the environment of sdkmanager.

Could you give it a try?
Thanks.

Hey Aasta,

I set up the nano following the instructions here: https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write
Is this wrong? I don’t see any mention of using the sdk manager.

Can you link me to the instructions on how to do it via the sdk manager

Hi,

After setting up the SD card image, you will also need to install all the packages from our sdkmanager.
Please find for more information in this page: https://developer.nvidia.com/embedded/jetpack

Thanks.

Hey Aasta,

do I do so via the serial port on the nano or can I use the SD card reader to put it on the SD Card?

Hi,

SDKmanager requires network or usb connection to install the package.
https://developer.nvidia.com/nvidia-sdk-manager

Thanks.

Hey Aasta,

when I run the sdkmanager for the Jetson, it says there is not enough disk space. I assume this is a problem with my host machine, however it has close to 50 Gigs free. How do I specify where the sdkmanager downloads the components, so that it doesn’t run out of disk space?