ImportError: No module named 'tensorrt'

Getting ImportError when trying to import tensorrt

Linux distro and version:
Ubuntu 16.0.4LTS

GPU type
Tesla K80

Driver Version: 418.40.04 CUDA Version: 10.1

CUDNN version
V7.5.17

Python version
3.5.2

Tensorflow version
1.13.1

TensorRT version
ii graphsurgeon-tf 5.0.2-1+cuda10.0 amd64 GraphSurgeon for TensorRT package
ii libnvinfer-dev 5.0.2-1+cuda10.0 amd64 TensorRT development libraries and headers
ii libnvinfer-samples 5.0.2-1+cuda10.0 all TensorRT samples and documentation
ii libnvinfer5 5.0.2-1+cuda10.0 amd64 TensorRT runtime libraries
ii python3-libnvinfer 5.0.2-1+cuda10.0 amd64 Python 3 bindings for TensorRT
ii python3-libnvinfer-dev 5.0.2-1+cuda10.0 amd64 Python 3 development package for TensorRT
ii tensorrt 5.0.2.6-1+cuda10.0 amd64 Meta package of TensorRT
ii uff-converter-tf 5.0.2-1+cuda10.0 amd64 UFF converter for TensorRT package

You are using CUDA 10.1 while your dpkg shows your packages are for CUDA 10.0.

Also you need to pip install tensorrt.whl.

Thanks! I noticed that and was working on reinstalling the environment but didn’t know about the second part you mentioned

Where can I find the tensorrt.whl?

1 Like

Could you please tell me how to install nvidia driver at jetson nano. I tried many different ways to install it but unfortunately failed every time. Without it I can’t install deep learning libraries…