LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-21-2019, 01:11 PM   #1
beefshepherd
LQ Newbie
 
Registered: Aug 2019
Posts: 6

Rep: Reputation: Disabled
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
 
Old 08-21-2019, 09:21 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,957

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
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.
 
Old 08-21-2019, 09:45 PM   #3
beefshepherd
LQ Newbie
 
Registered: Aug 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
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
 
Old 08-21-2019, 10:16 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,957

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
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.
 
Old 08-22-2019, 12:21 AM   #5
beefshepherd
LQ Newbie
 
Registered: Aug 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
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.
 
Old 08-22-2019, 12:33 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,957

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
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.
 
Old 08-22-2019, 12:40 AM   #7
beefshepherd
LQ Newbie
 
Registered: Aug 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-22-2019, 01:07 AM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,957

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
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.
 
Old 08-22-2019, 01:34 AM   #9
beefshepherd
LQ Newbie
 
Registered: Aug 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
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.
 
Old 08-22-2019, 01:43 AM   #10
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 5,957

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
Hi,
Quote:
Originally Posted by beefshepherd View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
python3 -V returns Python 2.7.12, can't get python3 to work. gene_ Ubuntu 15 03-18-2019 10:39 AM
[SOLVED] making python3.6.4 default python3 Astral Axiom Linux - Newbie 17 04-14-2018 10:55 AM
[SOLVED] how to start python3.6 interpreter just by typing python in terminal not python3.6 bmohanraj91 Linux - Newbie 4 05-10-2017 07:51 AM
After upgrade python3.4 to python3.5.1 , not able to install packages "request" though pip3 YOGESHAS87 Linux - Software 1 08-03-2016 10:38 PM
[SOLVED] python3 - trying to pickle object raises TypeError comp_brad1136 Programming 2 04-06-2011 07:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration