Python is a very powerful programming language. It is easy to lean and very simple to understand syntax. It is very efficient scripting language, that is why it is very popular now days.
Python available across all platforms including Ubuntu Linux. It has two versions python2 and python3. The latest version of python3 is python 3.6. In Ubuntu 17.10 and Ubuntu 18.04 has pre – installed python 3.6. But In UBUNTU 16.04 PYTHON 3.5 IS INSTALLED BY DEFAULT.
In order to install python 3.6 on Ubuntu 16.04 we need to use third party PPA.
Follow these steps to install python 3.6 on ubuntu 16.04
1.Open terminal ctrl+Alt+T and use following command.
sudo add-apt-repository ppa:jonathonf/python-3.6
2.Check for updates if available
sudo apt-get update
3.Then install python 3.6 by using the following command
sudo apt-get install python3.6
Now, you have to make python3.6 for python3 not python 3.5. Use these two commands
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
sudo update-alternatives –config python3
Then select python 3.6 Version. To check the python3 version, use command python3 -V
Note:If step 3 doesn’t works due to this bug, use this
sudo rm /usr/bin/python3 sudo ln -s python3.5 /usr/bin/python3
SHARE THE ARTICLE IF YOU THINK THIS IS HELPFUL TO YOU, IF ANY SUGGESTION OR MY ARTICLE NEEDS IMPROVEMENT PLEASE TELL ME BY COMMENTS BELOW. THANKS. `