Python 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
Installation latest Python 3.6 version into Linux Mint
there is error with APT
during installation. So USE apt-get
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 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:
This 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
Now we can choose the required version and switch as needed. For settings use the config command:
sudo update-alternatives --config python3
In 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,