LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   I'm trying to install a library required by nvidia TensorRt. The name of the library is python3-libnvinfer (https://www.linuxquestions.org/questions/linux-software-2/im-trying-to-install-a-library-required-by-nvidia-tensorrt-the-name-of-the-library-is-python3-libnvinfer-4175659541/)

beefshepherd 08-21-2019 01:11 PM

I'm trying to install a library required by nvidia TensorRt. The name of the library is python3-libnvinfer
 
I get the following errors when I'm trying to install the above mentioned package.

Code:

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 (>= 4.1.2) but it is not going to be          installed
    E: Unable to correct problems, you have held broken packages.

So tried to install python3-libnvinger. And it resulted in this.

Code:

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.6) but 3.6.7-1~18.04 is to be installed
    E: Unable to correct problems, you have held broken packages.

At this point I try installing python 3.5.7 and set it as my default python using update-alternatives command. Then aliased python3 to be python 3.5.7.

But the issue still persists. I'm planning to scrape/purge python3.6.8 and I don't know if it's a wise move as I've read some display managers use python and I'm not sure if it'll break anything. How should I go about this, Thanks.

I've also successfully TensorRt according to
Code:

dpkg -s TensorRt | grep Success

evo2 08-21-2019 09:21 PM

Hi,

what OS are you running and what apt sources do you have configured? If you have inxi installed, the output of the following command will provide that information:
Code:

inxi -Sr
Evo2.

beefshepherd 08-21-2019 09:45 PM

Quote:

Originally Posted by evo2 (Post 6028044)
what OS are you running and what apt sources do you have configured? If you have inxi installed, the output of the following command will provide that information:
Evo2.

I'm running an ubuntu spinoff, which is using ubuntu 18.04. I've added the following apt sources for instalhttps://tutorials.ubuntu.com/tutorial/tutorial-upgrading-ubuntu-desktophttps://tutorials.ubuntu.com/tutorial/tutorial-upgrading-ubuntu-desktopling the Nvidia cuda and TensoRrt
Code:

sudo dpkg -i nv-tensorrt-repo-ubuntu1604-cuda9.2-ga-trt4.0.1.6-20180612_1-1_amd64.deb
 sudo dpkg -i cuda-repo-ubuntu1710-9-2-local_9.2.148-1_amd64.deb


evo2 08-21-2019 10:16 PM

Hi,

can you fix those URLs please, and post exactly what sources you have configured.
Also, what instructions/documentation are did you follow to lead you to add the additional sources?

Evo2.

beefshepherd 08-22-2019 12:21 AM

Quote:

Originally Posted by evo2 (Post 6028063)
Hi,

can you fix those URLs please, and post exactly what sources you have configured.
Also, what instructions/documentation are did you follow to lead you to add the additional sources?

Evo2.

Hey, here you go, these were the sources that I used.

CUDA installation guide

CUDA DOWNLOAD

I used the above link for my Ubuntu 18.04 machine. It says that it was for Ubuntu 17 but I got the CUDA up and running

TensorRt installation guide

TensorRt 4.2 download

And they've listed it to be for 16.04 but again TensorRt was successfully installed. And I'm stuck at installation of python3-libnvinfer-dev which has a dependency on python3-libnvinfer which again has a dependency on python version <3.6 .

I've made python 3.5 as my default python version using update alternatives. Also tried linking python3 to be /usr/bin/python3.5.

evo2 08-22-2019 12:33 AM

Hi,

it looks like the problem is that you are trying to install packages for older versions of Ubuntu. Why don't you use packages for 18.04? What is the output of the following commands:
Code:

apt-cache policy python3-libnvinfer-dev python3-libnvinfer
apt-cache show python3-libnvinfer-dev python3-libnvinfer
dpkg --audit

?

Evo2.

beefshepherd 08-22-2019 12:40 AM

Quote:

apt-cache policy python3-libnvinfer-dev python3-libnvinfer
Code:

python3-libnvinfer-dev:
  Installed: (none)
  Candidate: 4.1.2-1+cuda9.2
  Version table:
    4.1.2-1+cuda9.2 500
        500 file:/var/nv-tensorrt-repo-cuda9.2-ga-trt4.0.1.6-20180612  Packages
python3-libnvinfer:
  Installed: (none)
  Candidate: 4.1.2-1+cuda9.2
  Version table:
    4.1.2-1+cuda9.2 500
        500 file:/var/nv-tensorrt-repo-cuda9.2-ga-trt4.0.1.6-20180612  Packages

Quote:

apt-cache show python3-libnvinfer-dev python3-libnvinfer
Code:

Package: python3-libnvinfer-dev
Priority: optional
Section: multiverse/devel
Installed-Size: 7
Maintainer: cudatools <cudatools@nvidia.com>
Architecture: amd64
Source: tensorrt
Version: 4.1.2-1+cuda9.2
Depends: python3-libnvinfer (>= 4.1.2), libnvinfer-dev (>= 4.1.2)
Filename: ./python3-libnvinfer-dev_4.1.2-1+cuda9.2_amd64.deb
Size: 1120
MD5sum: 07543d67a866e30682d3e01569a34e57
SHA1: 8dd4a04a20c11bbac8aece8182476ca9fedb2d79
SHA256: 79aac3fcd67076229179a0ee2779bf53086c30f0f7fc032b181a24025111dfd5
SHA512: e9e505d24a82709d62795f60dfc03d8ef6116e66400a2e884f3261bc5b480d84079244cf0ad31279bd2b238c35af6442f65d58c2c65e71431556807a05ef1a21
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: 5382
Maintainer: cudatools <cudatools@nvidia.com>
Architecture: amd64
Source: tensorrt
Version: 4.1.2-1+cuda9.2
Depends: python3 (>= 3.5), python3 (<< 3.6), libnvinfer4 (>= 4.1.2)
Filename: ./python3-libnvinfer_4.1.2-1+cuda9.2_amd64.deb
Size: 1040640
MD5sum: 6a863c8148f30c7c1e0ec18d8993961d
SHA1: 36ee1df0039b756ab32d321d4a54fe9e7b125e7c
SHA256: cfff0a8b6eaca68603beabc842c2e94d41476bf29fc68a2dc744563e08410cb5
SHA512: f6de5d8350bfe5326f504c0c2480c1cf916e5d75b14ac7eea703ed41371df37a01d7f2d68b762a7ac2673ddc75419c2490c7a721dd4fdd887984b11a7e1c02b3
Description: Python 3 bindings for TensorRT
 Python 3 bindings for TensorRT.
Description-md5: f33add15e2b8d80e2af8ee9c829c9180

Quote:

dpkg --audit
this returns nothing

evo2 08-22-2019 01:07 AM

Hi,

so it does look like you are trying to install packages for an older version of Ubuntu, presumably from a repo that you added following
https://docs.nvidia.com/deeplearning...ide/index.html
Can you not use repos for Ubuntu 18.04?

Evo2.

beefshepherd 08-22-2019 01:34 AM

Quote:

Originally Posted by evo2 (Post 6028098)
so it does look like you are trying to install packages for an older version of Ubuntu, presumably from a repo that you added following
https://docs.nvidia.com/deeplearning...ide/index.html
Can you not use repos for Ubuntu 18.04?
Evo2.

The pain is I need to set up those exact version of cuda and and Tensorrt, else I need to scrape the os and change to that version to set it up.

evo2 08-22-2019 01:43 AM

Hi,
Quote:

Originally Posted by beefshepherd (Post 6028107)
The pain is I need to set up those exact version of cuda and and Tensorrt, else I need to scrape the os and change to that version to set it up.

If you really do need those old versions then it is probably easiest to use an older OS.

Evo2.


All times are GMT -5. The time now is 05:26 PM.