Missing dependencies for python-liibnvinfer. TensorRT 7.2

Description

sudo apt-get install python3-libnvinfer 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

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

Environment

TensorRT Version: 7.2
GPU Type: GTX 2070
Nvidia Driver Version: 450.22
CUDA Version: 11.0
CUDNN Version: 8.0.5.39
Operating System + Version: Ubuntu 20.04
Python Version (if applicable): 3.8.2

Please help me solve this issue. I am trying to install tensorrt python api but nothing working out though c++ api is already installed. This command throws weird dependency error. What should I do? Do I have to recreate my virtual environment for the project and use downgraded version or is there an other alternative. Any guidance will be helpful.
Thank you

Hi @Himanshu01,

Please refer the following doc to validate installation steps you’re following.

Thank you.

I have gone through the installation documentations of tensorrt and followed exact procedure using debian installation

$ ~/ dpkg -l | grep TensorRT
ii  libnvinfer-bin                                              7.2.2-1+cuda11.0                        amd64        TensorRT binaries
ii  libnvinfer-dev                                              7.2.2-1+cuda11.0                        amd64        TensorRT development libraries and headers
ii  libnvinfer-doc                                              7.2.2-1+cuda11.0                        all          TensorRT documentation
ii  libnvinfer-plugin-dev                                       7.2.2-1+cuda11.0                        amd64        TensorRT plugin libraries
ii  libnvinfer-plugin7                                          7.2.2-1+cuda11.0                        amd64        TensorRT plugin libraries
ii  libnvinfer-samples                                          7.2.2-1+cuda11.0                        all          TensorRT samples
ii  libnvinfer7                                                 7.2.2-1+cuda11.0                        amd64        TensorRT runtime libraries
ii  libnvonnxparsers-dev                                        7.2.2-1+cuda11.0                        amd64        TensorRT ONNX libraries
ii  libnvonnxparsers7                                           7.2.2-1+cuda11.0                        amd64        TensorRT ONNX libraries
ii  libnvparsers-dev                                            7.2.2-1+cuda11.0                        amd64        TensorRT parsers libraries
ii  libnvparsers7                                               7.2.2-1+cuda11.0                        amd64        TensorRT parsers libraries
ii  python-libnvinfer                                           7.2.2-1+cuda11.0                        amd64        Python bindings for TensorRT
ii  python-libnvinfer-dev                                       7.2.2-1+cuda11.0                        amd64        Python development package for TensorRT
ii  tensorrt                                                    7.2.2.3-1+cuda11.0                      amd64        Meta package of TensorRT

The verification commands run without errors but it does not show python3-libnvinfer and python3-libnvinfer-dev which willbe installed through

sudo apt-get install python3-libnvinfer-dev

which returns me this error

$ sudo apt-get install python3-libnvinfer-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-libnvinfer-dev : Depends: python3-libnvinfer (= 7.2.2-1+cuda11.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And installing this unmet dependency results in the error posted above, which says that I need python3(<3.7) and I have 3.8.2 installed in Ubuntu 20.04. Is it a problem with my operating system version or python version or tensorrt installation? I am not able to understand. Why am I not able to install python tensorrt api while my c++ tensorrt api is working fine. Need help!!!

Thank you

Hi @Himanshu01,

We recommend you trying NVIDIA GPU Cloud (NGC) tensorrt optimized containers, which removes many of the host-side dependencies.

Thank you