Missing Dependency for python3-libnvinfer

Hi, all:
I installed tensorrt, as well as “python-libnvinfer” successfully on debian 10 system, but when I tried to install “python3-libnvinfer”, it reported:

The following packages have unmet dependencies:
 python3-libnvinfer : Depends: python3 (< 3.7) but 3.7.3-1 is to be installed

But my python3 version is 3.7.3, how could I fix this. Any help is appreciated.

Thanks

Hi,

I tried on my system and it seems to be working. Looks like some system dependency issue at your end.

Could you please recheck the python settings and follow steps mentioned in below link for TRT installation:
https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/tensorrt-700/tensorrt-install-guide/index.html#installing-debian

Also, I will recommend you to use NGC to reduce any host-side dependencies.

Thanks

Thanks for reply.

I have tried this tutorial many times, it gives the same results. Is there any way I can debug to see what’s wrong?
As for NGC, I now use this in another docker, so I can’t start another one inside it.

Thanks

Hi,

It’s seems to be a setup issue or mis-configuration issue. I would recommend to try it again with clean installation.

Also, please refer below link in case it helps:
https://devtalk.nvidia.com/default/topic/1048118/tensorrt/missing-dependency-for-python3-libnvinfer-tensorrt-5/post/5318905/#5318905

Thanks

It has been a while this thread was opened but I am facing exactly same problem.

As SunilJB suggested, I’ve clean installed all nvidia-related applications/drivers but still have a dependency problem.
Error message is exactly same as fengshuwi posted.

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

For me, it sounds like this library does not support python version higher than 3.7.
(installing python-libnvinfer (for python 2.x) has no problem. Only python3-libnvinfer causes the problem)

Currently I am using Ubuntu 19.10 with nvidia-driver-440 and cuda-10.2
Also I checked all dependency of python3-libnvinfer using following command,

apt-cache show python3-libnvinfer

and result shows

Package: python3-libnvinfer
Priority: optional
Section: multiverse/devel
Installed-Size: 2219
Maintainer: cudatools <cudatools@nvidia.com>
Architecture: amd64
Source: tensorrt
Version: 7.0.0-1+cuda10.2
Depends: python3 (>= 3.6), python3 (<< 3.7), libnvinfer7 (= 7.0.0-1+cuda10.2), libnvinfer-plugin7 (= 7.0.0-1+cuda10.2), libnvparsers7 (= 7.0.0-1+cuda10.2), libnvonnxparsers7 (= 7.0.0-1+cuda10.2)
Filename: ./python3-libnvinfer_7.0.0-1+cuda10.2_amd64.deb
...

Looks like I need to downgrade python version to 3.6. Or something else is the problem?

1 Like

I’m having the same exact issue!

same issue here!

sudo dpkg -i --force-overwrite python3-libnvinfer_7.0.0-1+cuda10.2_amd64.deb ─╯
Selecting previously unselected package python3-libnvinfer.
(Reading database … 224094 files and directories currently installed.)
Preparing to unpack python3-libnvinfer_7.0.0-1+cuda10.2_amd64.deb …
Unpacking python3-libnvinfer (7.0.0-1+cuda10.2) …
dpkg: dependency problems prevent configuration of python3-libnvinfer:
python3-libnvinfer depends on python3 (<< 3.7); however:
Version of python3 on system is 3.7.5-1.

dpkg: error processing package python3-libnvinfer (–install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python3-libnvinfer


apt-cache show python3-libnvinfer-dev python3-libnvinfer ─╯
Package: python3-libnvinfer-dev
Priority: optional
Section: multiverse/devel
Installed-Size: 10
Maintainer: cudatools cudatools@nvidia.com
Architecture: amd64
Source: tensorrt
Version: 7.0.0-1+cuda10.2
Depends: python3-libnvinfer (= 7.0.0-1+cuda10.2), libnvinfer-dev (= 7.0.0-1+cuda10.2), libnvinfer-plugin-dev (= 7.0.0-1+cuda10.2), libnvparsers-dev (= 7.0.0-1+cuda10.2), libnvonnxparsers-dev (= 7.0.0-1+cuda10.2)
Filename: ./python3-libnvinfer-dev_7.0.0-1+cuda10.2_amd64.deb
Size: 3648
MD5sum: 2429df6164f7a5330a56f00a9289b830
SHA1: 7b58eb25ef3c6459d54efe1ce3a4e89c6fa28c4c
SHA256: e4fbdde0b5731cd5b71606ee8fd45e8f048eb5d2936a3a74eb8a088840247cd5
SHA512: e0a8aa953b36d40a75da337f56dc928c448bab70a647536fba9beabd8a3345be09e62334a82ad52e41050799e3f867ea82cc2d18f95a54854041f41e8b0364a7
Description: Python 3 development package for TensorRT
Python 3 development package for TensorRT.
Description-md5: 858edc4abbfaf2883142085c85b93202

Package: python3-libnvinfer
Priority: optional
Section: multiverse/devel
Installed-Size: 2219
Maintainer: cudatools cudatools@nvidia.com
Architecture: amd64
Source: tensorrt
Version: 7.0.0-1+cuda10.2
Depends: python3 (>= 3.6), python3 (<< 3.7), libnvinfer7 (= 7.0.0-1+cuda10.2), libnvinfer-plugin7 (= 7.0.0-1+cuda10.2), libnvparsers7 (= 7.0.0-1+cuda10.2), libnvonnxparsers7 (= 7.0.0-1+cuda10.2)
Filename: ./python3-libnvinfer_7.0.0-1+cuda10.2_amd64.deb
Size: 354558
MD5sum: 9f908990d87a33364d99deb11c8ea5c0
SHA1: 5e70bf16404e0aa05b5acd6dcbc6e58d4e14309b
SHA256: 37f3fdd4be2bbce665e5904fd05fb98a02f8fc73de25517884690f537aacee1a
SHA512: fb39740f8bf6d522fccf0062f8e762fde8506cfbfc0ca26e62f321519bfab91035432b1f6f44f0962fb86abd8bb873f7a7f9bea03a8ebdbcfaf28101cae99ac5
Description: Python 3 bindings for TensorRT
Python 3 bindings for TensorRT.
Description-md5: f33add15e2b8d80e2af8ee9c829c9180