Hello,
I installed tensorrt v4.0.1.6 and it was working totally fine. Recently, I installed the nvidia sdk manager, and I believe that it automatically installs a tensorrt v4.0.3 (which is not existing anywhere as a release from tensorrt), but anyways, after that, when I try to import tensorrt, it does not work, and I receive a version mismatch error like below
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 tensorflow as tf
>>> import uff
>>> import tensorrt as trt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/tensorrt/__init__.py", line 82, in <module>
raise ImportError('TensorRT Library mismatch, expected version ' + str(__version__) + ' got version ' + str(inferLibMajor) + '.' + str(inferLibMinor) + '.' + str(inferLibPatch))
ImportError: TensorRT Library mismatch, expected version 4.0.1.6 got version 4.0.3
>>> import tensorrt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/tensorrt/__init__.py", line 53, in <module>
from tensorrt import __versions__
ImportError: cannot import name __versions__
I searched into my whole system for the tensorrt v4.0.3 and I was not able to locate it anywhere, I even don’t know where is this version installed, and it is not even in the synaptic or anywhere else
As a work around, I uninstalled the current tensorrt v4.0.1.6, and I tried to import it again in python, assuming that it should now import v4.0.3 (if available), and I received that no tensorrt is there
So I installed again v4.0.1.6, and then I receive the same 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 tensorflow as tf
>>> import uff
>>> import tensorrt as trt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/tensorrt/__init__.py", line 82, in <module>
raise ImportError('TensorRT Library mismatch, expected version ' + str(__version__) + ' got version ' + str(inferLibMajor) + '.' + str(inferLibMinor) + '.' + str(inferLibPatch))
ImportError: TensorRT Library mismatch, expected version 4.0.1.6 got version 4.0.3
>>> import tensorrt
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/tensorrt/__init__.py", line 53, in <module>
from tensorrt import __versions__
ImportError: cannot import name __versions__
I really don’t know what the problem is and I am stuck now, since I cannot use tensorrt
my LD_LIBRARY_PATH is
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/python2.7/dist-packages/tensorrt/
export LD_LIBRARY_PATH=/usr/local/cuda/targets/aarch64-linux/lib:$LD_LIBRARY_PATH