Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No "tensorrt" module in python3.8 ? #11

Closed
Akiautiste opened this issue Jul 19, 2022 · 10 comments
Closed

No "tensorrt" module in python3.8 ? #11

Akiautiste opened this issue Jul 19, 2022 · 10 comments

Comments

@Akiautiste
Copy link

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

@Qengineering
Copy link
Owner

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!

@Akiautiste
Copy link
Author

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.

@Qengineering
Copy link
Owner

Glad to hear you succeeded!

@gagipro
Copy link

gagipro commented Aug 9, 2022

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 !

@merhovon
Copy link

merhovon commented Feb 9, 2023

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?

@liutaiyuan1
Copy link

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?

@gagipro
Copy link

gagipro commented Apr 10, 2023

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...

@liutaiyuan1
Copy link

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

@theikkila
Copy link

theikkila commented Jun 15, 2023

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

@Qengineering
Copy link
Owner

Please find the TensorRT python wheel at the main page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants