» » Python 3.6 - install latest version into Linux Mint

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:
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt 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!!!

Print version

Add comments

  • Local comments
  • Facebook comments
whoops 6 July 2017 14:22
Just a heads up, this nigh destroyed my Mint installation - no window bars, terminal wouldn't start, no start menu, black desktop.

I had to reset it to python 3.5 in recovery mode to be able to use Mint again.
  • +1
Dongmin An 1 September 2017 17:48
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
  • +1
shandr 25 September 2017 17:16
Looks like 'sudo apt install python3.6' is trying to upgrade 3.5 to 3.6. That's why Mint crashes.
Instead of 'sudo apt install python3.6' use
sudo apt-get install python3.6

It will only install python3.6 as an addition to 3.5 and it will not harm OS.
  • 0
Dino 16 October 2017 10:28
very useful, many thanks!
  • 0
Bill MacLane 2 November 2017 11:24
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.
  • 0
Shekin 2 November 2017 13:25
Bill MacLane,
Of course, use any distro, good Linux distributions are very, very much.
x64 Linux Mint 18.2 cinnamon
  • 0
Ben Per 6 November 2017 15:25
Same problem here.
How did you reset python though?
Thank you
  • 0
Shekin 6 November 2017 15:32
Ben Per,
what kinde of Mint you use? i juast tested on 18.2, and works great
x64 Linux Mint 18.2 cinnamon
  • 0
Will 25 November 2017 13:32
If this doesn't work for anyone, reboot linux mint, when you login choose the software recovery mode (on cinnamon this is done by clicking the mountain looking icon next to your name) when you're in this mode press ctrl+alt+f1. This should open up 'terminal' full screen. From here do sudo update-alternatives --config python3 and select python 3.5 (option 1 for most) you should get confirmation of this. Reboot mint again and log in normally.
  • 0
  • bowtiesmilelaughingblushsmileyrelaxedsmirk