Python 3.6 – install latest version into Linux Mint

Python 3.6 - install latest version into Linux MintPython is one of the most popular programming languages for Linux. It is written many different tools and libraries. In addition, Python is popular among developers because it is very easy and quick programming, and it’s actually simple to master.If you have installed the operating system Linux mint, you are learning the programming language Python and want to work with the latest version, then this article is for you.
Now I have installed Linux Mint 18.1 and the default installed version 2.7 and 3.5. You can check this with commands

python -V
python2 -V
python3 -V
Installation latest Python 3.6 version into Linux Mint:
there is error with APT during installation. So USE apt-get like below
In addition python 3.6 for some reason the cinnamon breaks the system.
Note, use TimeShift before installing Python
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt-get install python3.6
Check the version of the installed Python 3.6
python3.6 -V
Please note that the old version is still here, it still available by the name of python3 and the new can now be loaded with the command python3.6. If you want to use this version instead of the 3.5 to run all the programs, there is a utility update-alternatives. But if you try to get a list of possibilities, we get the error:
Python 3.6 - install latest version into Linux MintThis is normal, you need to first setup what files for that answer, because the maintainers did not care about it :
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
Now look again:
update-alternatives --list python3
Python 3.6 - install latest version into Linux MintNow we can choose the required version and switch as needed. For settings use the config command:
sudo update-alternatives --config python3
Python 3.6 - install latest version into Linux MintIn the prompt you need to specify the program number you want to use by default.

Be careful with a selection of versions, not to touch the python (python2), just use python3, as I said, Python 2.7 written in a variety of system tools, and if you try to run them the wrong version of the interpreter, then nothing happens.

May the Force be with you,
Good Luck!!!
python.org

Share to friends
Shekin
Rate author
( 1 assessment, average 2 from 5 )
MintGuide.Org
Subscribe
Notify of
guest
17 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Dongmin An
Dongmin An
2022 years ago

Yup had the same issue! Keep python 3.5 for now, and hope that the mint team will do something about it in the future. Thanks for the tutorial though

Bill MacLane
Bill MacLane
2022 years ago

Does not work.
Does not install Python 3.6
Does not correct the alternatives
Even the sign in on the site does not work. As far as I can tell the name of this site is Mint Guide, but the sign in does not like it. I'm about to give up on mint and use a different distro that works.

Shekin
Shekin
2022 years ago

Bill MacLane,
Of course, use any distro, good Linux distributions are very, very much.

Ben Per
Ben Per
2022 years ago

whoops,
Same problem here.
How did you reset python though?
Thank you
Ben

Shekin
Shekin
2022 years ago

Ben Per,
what kinde of Mint you use? i juast tested on 18.2, and works great

Eduardo Reis
Eduardo Reis
2022 years ago

Thanks for broke my system. I'm going back to windows.

Shekin
Shekin
2022 years ago

Eduardo Reis,
yes, there is error with apt…
Use apt-get
sudo apt-get install python3.6

Kajsa
Kajsa
2022 years ago

Installed python3.6.3 but I can't install numpy or any other external packages into it so I will remove it again.

Bob
Bob
2022 years ago

Avoid setting update-alternatives when using LM 18.3 if you are new to linux. When changed, I had several issues restricting me from opening update manager and installing apps through the app manager.

Bé Pont Dé
Bé Pont Dé
2022 years ago

Well it worked for me on Mint 17.2. No side effects yet.

Okay, so I logged out, logged back in. All seems to be good in Mint 17.2 Cinnamon. (I did the install in cinnamon as well). I even got some software update installed for python 3.6.3. So thanks for the help! I'll try this method in a newer Mint when I feel more adventurous. 😛

asd
asd
2022 years ago

dont use this fucking method of hell, this shit fucked up my system at all, I was restoring for 2 hour

Pedro
Pedro
2022 years ago

It will not work if you use like that… it is not with python3 must use python like this:
sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.5 1
sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.6 2

instead of:
sudo update-alternatives –install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives –install /usr/bin/python3 python3 /usr/bin/python3.6 2

Next time you give a hint please check if it works on a clean installation or what you are doing is create more harm than good.

Gregor
Gregor
2022 years ago

I'm still using LinuxMint 17.3 with python3.4 as preinstalled standard. After making python3.6 the auto-selection by "update-alternatives" with highest prio, the desktop windows decorator isn't working anymore.
Thats why oldest/preinstalled python3 version should be taken as auto/default…

ean mcdongle
ean mcdongle
2 years ago

kachow

ean mcdongle
ean mcdongle
2 years ago

It will not work if you use like that… it is not with python3 must use python like this: sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.5 1 sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.6 2 instead of: sudo update-alternatives –install /usr/bin/python3 python3 /usr/bin/python3.5 1 sudo update-alternatives –install /usr/bin/python3 python3 /usr/bin/python3.6 2 Next time you give a hint please check if it works on a clean installation or what you are doing is create more harm than good.
Source: https://mintguide.org/other/794-python-3-6-install-latest-version-into-linux-mint.html

ean mcdongle
ean mcdongle
2 years ago

It will not work if you use like that… it is not with python3 must use python like this: sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.5 1 sudo update-alternatives –install /usr/bin/python python /usr/bin/python3.6 2 instead of: sudo update-alternatives –install /usr/bin/python3 python3 /usr/bin/python3.5 1 sudo update-alternatives –install /usr/bin/python3 python3 /usr/bin/python3.6 2 Next time you give a hint please check if it works on a clean installation or what you are doing is create more harm than good.

Ken
Ken
1 year ago

Title is misleading. I was hoping to upgrade to the latest version of python.