Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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
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.
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!')
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.