In Ubuntu 16.04, the system installs Python version 2.7 and 3.5 by default, but during development we may use the python3.6, remove the default version and worry about the system, so you can choose to install the python3.6 on the system.
1. Configure the repositories, because the Python 3.6 version is not published in the official Ubuntu warehouse, we do through the 3rd party warehouse. On the command line, enter:
sudo add-apt-repository ppa:jonathonf/python-3.6
2. Check the System software package and install Python 3.6
sudo apt-get updatesudo apt-get install python3.6
3. View Python version information (now there are 3 Python versions in your system)
Python-vpython2-vpython3-vpython3.6-v
4. Through the above instructions we found that the new installation of the 3.6 need to enter python3.6 to use, that can be configured I only enter Python3 when the default use of 3.6, of course, execute the following command:
sudo update-alternatives--install/usr/bin/python3 python3/usr/bin/python3.5 1sudo update-alternatives--install/usr /bin/python3 python3/usr/bin/python3.6 2sudo update-alternatives--config Python3
5. Test whether Python3 default to 3.6 version
Python3-v
ubuntu16.04 Installation Configuration python3.6