import tensorrt as trt fails


My current versions:

CUDA 9.0
CudNN 7

using python 3.5.2

I am having issues with running the following code:
import uff
import tensorflow as tf
import tensorrt as trt

As presented in your guide:

The problem occurs on the 3rd line (import tensorrrt…), and it reads as such:

Traceback (most recent call last):
File “”, line 1, in
File “/home/isl/.local/lib/python3.5/site-packages/tensorrt/”, line 77, in
from tensorrt import infer, parsers, utils, lite, plugins
File “/home/isl/.local/lib/python3.5/site-packages/tensorrt/parsers/”, line 54, in
from . import caffeparser
File “/home/isl/.local/lib/python3.5/site-packages/tensorrt/parsers/caffeparser/”, line 51, in
from ._nv_caffe_parser_bindings import *
ImportError: cannot open shared object file: No such file or directory

We have tried downloading multiple versions of TensorRT and the problem doesn’t stop, could you please help with figuring out how we can overcome this issue?


Was having a similar issue but it failed on _nv_infer_bindings instead of ._nv_caffe_parser_bindings.

It got solved when we put the correct LD_LIBRARY_PATH to TensorRT-x.x.x.x/lib, something like this:

export LD_LIBRARY_PATH="/usr/local/cuda-9.0/lib64:/opt/TensorRT-"

Hope it helps.

Hey eknic, sorry for the late reply, thank you so much! we managed to work it out thanks to your help.
We have made great progress, and we are missing only a single step in the process of running our model on the Drive-PX2, maybe you might have an idea for that as well?