How to install tensorRT for python2.7 on TX2

I tried to install tensorRT 4.0 on TX2 with tar file, because my cudnn is 7.1.
However, after I pip install .whl in the TensorRT4.0/python folder and tried to import tensorrt in python2.7, I got this error:

Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import tensorrt
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/tensorrt/init.py”, line 71, in
from tensorrt import infer, parsers, utils, lite, plugins
File “/usr/local/lib/python2.7/dist-packages/tensorrt/infer/init.py”, line 50, in
from ._infer_enums import *
File “/usr/local/lib/python2.7/dist-packages/tensorrt/infer/_infer_enums.py”, line 54, in
from tensorrt.infer import _nv_infer_bindings as nvinfer
ImportError: /usr/local/lib/python2.7/dist-packages/tensorrt/infer/_nv_infer_bindings.so: cannot open shared object file: No such file or directory

But the _nv_infer_bindings.so exists in that folder.
What should I do?

Hi,

Please install TensorRT through the Jetson specific Software Manager, JetPack: https://developer.nvidia.com/embedded/jetpack

You should be able to setup TensorRT for Python through this.

Thanks,
NVIDIA Enterprise Support