Trouble Installing TensorRT 5.1 RC for Tensorflow 1.13.1

Attempting to use:
TensorFlow version: 1.13.1
Python version: 3.6.7
CUDA Version: 10.0
Ubuntu: 18.04

to play around with TensorRT 5.1 rc in TensorFlow. I downloaded nv-tensorrt-repo-ubuntu1804-cuda10.0-trt5.1.2.2-rc-20190227_1-1_amd64.deb . I got through all these steps in the installation guide:
sudo dpkg -i
nv-tensorrt-repo-ubuntu1x04-cudax.x-trt5.1.x.x-rc-yyyymmdd_1-1_amd64.deb
$ sudo apt-key add /var/nv-tensorrt-repo-cudax.x-trt5.1.x.x-rcyyyymmdd/
7fa2af80.pub

sudo apt-get update

But when I got to here to this, I got the following error:
sudo apt-get install tensorrt

The following packages have unmet dependencies:
tensorrt : Depends: libnvinfer5 (= 5.1.2-1+cuda10.0) but 5.1.2-1+cuda10.1 is to be installed
Depends: libnvinfer-dev (= 5.1.2-1+cuda10.0) but 5.1.2-1+cuda10.1 is to be installed
E: Unable to correct problems, you have held broken packages.

I’d sure love to try out the RC1 since it supports many more TF ops.

I don’t know what to do. I’ve reinstalled and installed packages and it is still the same. I cannot upgrade my CUDA to 10.1 because TensorFlow 1.3.1 is not compatible. Any help would greatly be appreciated. Thanks

I have a similar problem coming from this install guide
https://www.tensorflow.org/install/gpu

The following packages have unmet dependencies:
 libnvinfer-dev : Depends: libnvinfer5 (= 5.0.2-1+cuda10.0) but 5.1.2-1+cuda10.1 is to be installed
E: Unable to correct problems, you have held broken packages.

I don’t know why it tries to install cuda10.1 because in every step cuda10.0 is explicitly mentioned.
Hope someone has a smart answer to that!

Could fix my problem with the help of this post
https://github.com/tensorflow/tensorflow/issues/26987#issuecomment-481226004

explicitly runing this

sudo apt-get install -y --no-install-recommends libnvinfer5=5.0.2-1+cuda10.0

helped to get rid of my problem.

For you I suggest trying these two commands:

sudo apt-get install -y --no-install-recommends libnvinfer5=5.1.2-1+cuda10.0
sudo apt-get install -y --no-install-recommends libnvinfer-dev=5.1.2-1+cuda10.0

Hope it fixes the problem ;)

Thanks, that fixed my problem for installing tensorrt as well as the C++ libraries. Now if I wish to install the Python packages using your intuition from above:

sudo apt-get install -y --no-install-recommends python3-libnvinfer=5.1.2-1+cuda10.0
sudo apt-get install -y --no-install-recommends python3-libnvinfer-dev=5.1.2-1+cuda10.0

I get the error:

The following packages have unmet dependencies:
python3-libnvinfer : Depends: python3 (< 3.6) but 3.6.7-1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.

However, I have python3 version 3.6.7. So I am a little confused on what to do. Is removing python3 and then reinstalling it the way to go? Is there something else I should try?

Seems like u need a python version below 3.6 - try to install python 3.5.x and try the steps again.

Hi,

If you’re looking to just try out new versions of TensorRT and don’t want to have to reconfigure your machine for each (like installing a different python version), you can try using https://github.com/NVIDIA/nvidia-docker with our containerized versions here : https://ngc.nvidia.com/catalog/containers/nvidia:tensorrt

You can see what configurations each container tag comes with here: https://docs.nvidia.com/deeplearning/sdk/tensorrt-container-release-notes/rel_19-04.html#rel_19-04

For example, the latest NGC TensorRT image is 19.04 (2019 April), which comes with TensorRT 5.1.2.


Otherwise, please let us know if installing a different python version solved your issue as mentioned above.

Thanks,
NVIDIA Enterprise Support

I have tried the solutions as mentioned below

sudo apt-get install -y --no-install-recommends libnvinfer5=5.1.2-1+cuda10.0
sudo apt-get install -y --no-install-recommends libnvinfer-dev=5.1.2-1+cuda10.0

But still getting the error. To resolve the above error please perform the below steps

sudo apt-get install libnvinfer5=5.1.2-1+cuda10.0
sudo apt-get install libnvinfer-dev=5.1.2-1+cuda10.0

So I hope this may help you.

1 Like

Need version dependecies to use on ubuntu 18.04 for Tensorflow object detection packages like,
tensorflow,tensort,cuda,cudnn.can suggest me which versions i should i use it.