Jetson-Nano-Ubuntu-20-image icon indicating copy to clipboard operation
Jetson-Nano-Ubuntu-20-image copied to clipboard

No "tensorrt" module in python3.8 ?

Open Akiautiste opened this issue 2 years ago • 4 comments

dear author,i can not import python package:"tensorrt",is there not include tensorrt pybind in this ubuntu20.04 image?

Akiautiste avatar Jul 19 '22 12:07 Akiautiste

Unfortunately, it seems rather difficult to change the Python binding of TensorRT. I've been working on it for a while now, but no luck so far. TensorRT is an integral part of your JetPack and is not easy to install 'separately'. First of all, I don't see a solution to make TensorRT work with Python 3.8. If anyone has any suggestions, let me know!

Qengineering avatar Jul 21 '22 11:07 Qengineering

Unfortunately, it seems rather difficult to change the Python binding of TensorRT. I've been working on it for a while now, but no luck so far. TensorRT is an integral part of your JetPack and is not easy to install 'separately'. First of all, I don't see a solution to make TensorRT work with Python 3.8. If anyone has any suggestions, let me know!

haha, i solved it... I extract ubuntu18.04 jetson nano image file,can find tensorrt packages in path:/usr/lib/python3.6/dist-packages/tensorrt , Just copy tensorrt*/ to ubuntu20.04,of course ,need build&install python3.6 in ubuntu20.04.

Akiautiste avatar Jul 21 '22 11:07 Akiautiste

Glad to hear you succeeded!

Qengineering avatar Jul 21 '22 12:07 Qengineering

Hi,

got same issue and of course manage also to make it work with python 3.6.

But we need a way to have tensorrt with 3.8.

I see perhaps a solution with tiny tensorrt… really not sure !

gagipro avatar Aug 09 '22 23:08 gagipro

I was wondering why I get the following error message:

I see perhaps a solution with tiny tensorrt… really not sure !

Does anyone perhaps have a solution?

merhovon avatar Feb 09 '23 12:02 merhovon

Unfortunately, it seems rather difficult to change the Python binding of TensorRT. I've been working on it for a while now, but no luck so far. TensorRT is an integral part of your JetPack and is not easy to install 'separately'. First of all, I don't see a solution to make TensorRT work with Python 3.8. If anyone has any suggestions, let me know!

haha, i solved it... I extract ubuntu18.04 jetson nano image file,can find tensorrt packages in path:/usr/lib/python3.6/dist-packages/tensorrt , Just copy tensorrt*/ to ubuntu20.04,of course ,need build&install python3.6 in ubuntu20.04.

I copied tensorrt*, but no, do you change anything else?

liutaiyuan1 avatar Apr 10 '23 07:04 liutaiyuan1

Unfortunately, it seems rather difficult to change the Python binding of TensorRT. I've been working on it for a while now, but no luck so far. TensorRT is an integral part of your JetPack and is not easy to install 'separately'. First of all, I don't see a solution to make TensorRT work with Python 3.8. If anyone has any suggestions, let me know!

haha, i solved it... I extract ubuntu18.04 jetson nano image file,can find tensorrt packages in path:/usr/lib/python3.6/dist-packages/tensorrt , Just copy tensorrt*/ to ubuntu20.04,of course ,need build&install python3.6 in ubuntu20.04.

I copied tensorrt*, but no, do you change anything else?

He managed with python 3.6...

gagipro avatar Apr 10 '23 07:04 gagipro

Unfortunately, it seems rather difficult to change the Python binding of TensorRT. I've been working on it for a while now, but no luck so far. TensorRT is an integral part of your JetPack and is not easy to install 'separately'. First of all, I don't see a solution to make TensorRT work with Python 3.8. If anyone has any suggestions, let me know!

haha, i solved it... I extract ubuntu18.04 jetson nano image file,can find tensorrt packages in path:/usr/lib/python3.6/dist-packages/tensorrt , Just copy tensorrt*/ to ubuntu20.04,of course ,need build&install python3.6 in ubuntu20.04.

I copied tensorrt*, but no, do you change anything else?

He managed with python 3.6...

Me too, but I can't use it

liutaiyuan1 avatar Apr 10 '23 09:04 liutaiyuan1

Found that you can pretty easily compile tensorrt from sources. I used the python3.8.10 shipped with the Image provided by Qengineering and followed these instructions to build tensorrt:

https://github.com/NVIDIA/TensorRT/tree/8.0.1#building-tensorrt-oss

cd $TRT_OSSPATH
mkdir -p build && cd build
cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out -DTRT_PLATFORM_ID=aarch64 -DCUDA_VERSION=10.2
make -j$(nproc)

sudo make install

I also created python bindings by following the instructions here: https://github.com/NVIDIA/TensorRT/tree/8.0.1/python

Hope this helps @Akiautiste @liutaiyuan1 @Qengineering

theikkila avatar Jun 15 '23 18:06 theikkila

Please find the TensorRT python wheel at the main page.

Qengineering avatar Jul 13 '23 16:07 Qengineering