LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-14-2018, 09:36 AM   #1
asher@tehll
LQ Newbie
 
Registered: Jan 2018
Location: North Carolina
Distribution: Linux Mint 18.3 Sylva
Posts: 10

Rep: Reputation: Disabled
Updating Python Version to 3.6.4


I am trying to update my python version from 3.5.2 to the newest 3.6.4 however when I try to install using:
sudo apt-get install python 3.6
I get the error message:
nvidia-libopencl1-346-updates : Depends: nvidia-libopencl1-352-updates but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I have also done:
sudo apt-get clean && sudo apt-get update
sudo apt-get upgrade
Then tried again only to get the same message, any ideas or fixes. I downloaded the file from the python website and tried to install it directly from there but it wont work either.
I am using Linux Mint 18.3 Sylvia
Any advice would be welcome I am about to start learning to code in Python and I want the latest version installed. I am a Linux newbie but am forcing myself to work with it to get my skills up. Thanks

Last edited by asher@tehll; 01-14-2018 at 11:49 AM. Reason: Title misspelled
 
Old 01-14-2018, 10:56 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Python is one of the packages that is fairly fundamental to most distros. It ties in with quite a bit of software, and therefore the distro maintainers carefully choose a version in relation to the other software in the distro that will be using it.

Mint is quite a conservative distro, for reasons of stability, and it is for this reason that the version of Python is not bang up to date. Bringing it up to date may in fact cause problems due to the network of dependencies within the distro.

I personally would suggest that you don't need to install 3.6.4. I do a lot of Python programming on my Mint machine and the current version, 3.5.2, does me nicely.

If, however, you are adamant that you want the latest version, then I would suggest that you use a more cutting edge distro.

Note that Mint 19 will come out in June or thereabouts, and will no doubt include a more up-to-date version of Python 3,

Just a final point that Mint has in fact two Python versions installed, Python 2 and Python 3. It needs both. Some people have tried uninstalling Python 2 in the past, with resultant problems.
 
1 members found this post helpful.
Old 01-14-2018, 11:01 AM   #3
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
On a separate issue to the one addressed in my previous answer, your apt-get packaging problem appears to be due to the previous installation of nvidia-libopencl1-346-updates. Is this a package you have tried to install lately?

P.S. You may want to change the spelling in the title of this thread from "Pyhton" to "Python". I know it sounds very pedantic (and I apologise for that!), but if you are going to be a programmer then you need to develop an eye for things like this. Programming is very unforgiving.
 
1 members found this post helpful.
Old 01-14-2018, 11:51 AM   #4
asher@tehll
LQ Newbie
 
Registered: Jan 2018
Location: North Carolina
Distribution: Linux Mint 18.3 Sylva
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks hydrurga that was very helpful thanks for the advice and I fixed the title of the post, good eye.
 
Old 01-14-2018, 11:56 AM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
No problem. We still have to solve that apt-get problem though.

Can you please paste here (within CODE tags - you can use the # button on the advanced menu to insert these) the output from:

Code:
inxi -r
 
Old 01-14-2018, 12:04 PM   #6
asher@tehll
LQ Newbie
 
Registered: Jan 2018
Location: North Carolina
Distribution: Linux Mint 18.3 Sylva
Posts: 10

Original Poster
Rep: Reputation: Disabled
Code:
Repos:     Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://packages.linuxmint.com sylvia main upstream import backport
           deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ xenial partner
           Active apt sources in file: /etc/apt/sources.list.d/official-source-repositories.list
           deb-src http://packages.linuxmint.com sylvia main upstream import backport
           deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
           deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
           deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
           deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
           deb-src http://archive.canonical.com/ubuntu/ xenial partner
 
Old 01-14-2018, 12:07 PM   #7
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok, that looks great. Now:

Code:
apt check
 
Old 01-14-2018, 12:08 PM   #8
asher@tehll
LQ Newbie
 
Registered: Jan 2018
Location: North Carolina
Distribution: Linux Mint 18.3 Sylva
Posts: 10

Original Poster
Rep: Reputation: Disabled
Code:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
 
Old 01-14-2018, 12:12 PM   #9
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Ok, perfect again.

Now:

Code:
apt update
 
Old 01-14-2018, 12:14 PM   #10
asher@tehll
LQ Newbie
 
Registered: Jan 2018
Location: North Carolina
Distribution: Linux Mint 18.3 Sylva
Posts: 10

Original Poster
Rep: Reputation: Disabled
Code:
Ign:1 http://packages.linuxmint.com sylvia InRelease
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Hit:3 http://packages.linuxmint.com sylvia Release                                                       
Hit:4 http://archive.ubuntu.com/ubuntu xenial InRelease                                        
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] 
Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]         
Fetched 306 kB in 2s (120 kB/s)                                     
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
 
Old 01-14-2018, 12:25 PM   #11
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
All looking good. But you say that when you try to install a package, you get the nvidia-related error?

If so, can you try:

Code:
apt install fortunes-de
(it's a small package with no side-effects, just to test the situation - you can uninstall it afterwards).
 
Old 01-14-2018, 12:34 PM   #12
asher@tehll
LQ Newbie
 
Registered: Jan 2018
Location: North Carolina
Distribution: Linux Mint 18.3 Sylva
Posts: 10

Original Poster
Rep: Reputation: Disabled
I installed that but honestly the python 3.6.4 package is the only thing I have tried to install thus far so I am not sure if I will have the same problem with other packages. Are there any "essentials" you can recommend either from a programming stand point or just good to have in general? That way we can test it out.
 
Old 01-14-2018, 12:42 PM   #13
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Yup, but it looked as if there was a held package from a previous installation. Obviously that isn't the case which is great. You can now uninstall that temporary package with:

Code:
sudo apt-get --purge autoremove fortunes-de
You should run Idle (through the Mint menu is easiest) and test Python with a quick program e.g.

Code:
# This program prints Hello, world!

print('Hello, world!')
(taken from https://www.programiz.com/python-programming/examples - you'll find other stuff to play around with)
 
Old 01-14-2018, 12:54 PM   #14
asher@tehll
LQ Newbie
 
Registered: Jan 2018
Location: North Carolina
Distribution: Linux Mint 18.3 Sylva
Posts: 10

Original Poster
Rep: Reputation: Disabled
Everything seems to be working just fine. IDLE automatically pulls up Python 2.7.12 which I guess is fine I can wait until the new Linux Mint version comes out but how would I pull up IDLE to use 3.5?
 
Old 01-14-2018, 01:03 PM   #15
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by asher@tehll View Post
Everything seems to be working just fine. IDLE automatically pulls up Python 2.7.12 which I guess is fine I can wait until the new Linux Mint version comes out but how would I pull up IDLE to use 3.5?
Ok. It doesn't do that on my system. You can run Python 3's Idle from the command line with:

Code:
idle-python3.5 &
If that works, you can add a shortcut to the menu and/or the desktop.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] building boost.pyhton aihaike Linux - Software 2 12-03-2010 12:40 AM
[SOLVED] sequence and merge jpeg images using pyhton? dili Programming 7 06-11-2010 05:04 AM
updating Kernel from version 2.6.9 to version 2.6.19 varala_kanth Linux - Kernel 1 01-18-2007 03:21 AM
pyhton-devel libraries not found? daTerminehtor SUSE / openSUSE 2 07-19-2006 02:53 PM
Pyhton Directory List facets Programming 4 06-09-2004 09:24 AM

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

All times are GMT -5. The time now is 12:24 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
Open Source Consulting | Domain Registration