» » Python 3.6 - install latest version into Linux Mint

Python 3.6 - install latest version into Linux Mint

Section: Other | Actuality: Linux Mint 18.1 Serena
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!!!

Print version

Edited by: Shekin - 12-06-2019, 04:46
Reason: New information added

106 628
  1. Dongmin An
    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
  2. Bill MacLane
    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
  3. Shekin 2 November 2017 13:25
    Bill MacLane,
    Of course, use any distro, good Linux distributions are very, very much.
    x64 Linux Mint 18.3 cinnamon
    • 0
  4. Ben Per
    Ben Per 6 November 2017 15:25
    Same problem here.
    How did you reset python though?
    Thank you
    • 0
  5. 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.3 cinnamon
    • 0
  6. Eduardo Reis
    Eduardo Reis 3 February 2018 06:28
    Thanks for broke my system. I'm going back to windows.
    • 0
  7. Shekin 5 February 2018 03:42
    Eduardo Reis,
    yes, there is error with apt...
    Use apt-get
    sudo apt-get install python3.6
    x64 Linux Mint 18.3 cinnamon
    • 0
  8. Kajsa
    Kajsa 4 April 2018 17:12
    Installed python3.6.3 but I can't install numpy or any other external packages into it so I will remove it again.
    • 0
  9. Bob
    Bob 7 May 2018 12:57
    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.
    • +1
  10. Bé Pont Dé
    Bé Pont Dé 13 May 2018 10:30
    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. :P
    • 0
  11. asd
    asd 26 June 2018 19:20
    dont use this fucking method of hell, this shit fucked up my system at all, I was restoring for 2 hour
    • 0
  12. Pedro
    Pedro 27 June 2018 13:03
    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.
    • +1
  13. Gregor
    Gregor 28 June 2018 03:45
    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...
    • 0
    Your favorite Linux distribution is Other polls