HOW TO INSTALL PYTHON 3.6 ON UBUNTU 16.04
In this article we are going to discuss on How to Install Python 3.6 on Ubuntu 16.04. Before that let’s understand what is Python ?
What is Python ?
Python is a very popular Programming Language like C, C++, Java, Perl..etc. It was first invented on year 1989 by Sir. Guido van Rossum under Python Software Foundation. There is an interesting story behind the name “python“. During implementation of Language Guido van Rossum was reading the BBC comedy Series Script i.e. Monty Python’s Flying Circus and from there they took the name “Python” for his Implementation. Python is quite shorter and much easier to code as compared to other programming language for example one task can be completed in one Month by using Python but the same task will take more then a year with C++. Due to it’s rich features like supports Third Party Modules, User friendly data structure python is more popular then other programming languages. Disadvantage in python is it consumes so many memory as compared to other programming language like C/C++. Latest Stable version of Python is Python 3.6.
Let’s have a look at the steps on How to Install Python 3.6 on Ubuntu 16.04
Follow the below Steps to Install Python 3.6 on Ubuntu 16.04
Step : 1 Update the Ubuntu 16.04 Repositories
Update the Ubuntu 16.04 packages and repositories before install Python 3.6.
elinuxbook@ubuntu:~$ sudo apt-get update # Update Ubuntu 16.04 Packages and Repositories
[sudo] password for elinuxbook:
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 306 kB in 2s (129 kB/s)
Reading package lists... Done
Step : 2 Download the Python 3.6 Package
Now we have to Download latest stable version of Python 3.6 package, for that go to official website of Python. Click on below link to download the Package.
https://www.python.org/downloads/
So we have successfully downloaded the latest stable version of Python 3.6 as shown below.
elinuxbook@ubuntu:~$ cd Downloads/ elinuxbook@ubuntu:~/Downloads$ ls Python-3.6.0.tar.xz # Downloaded Python 3.6 Package
Step : 4 Install the Package
Extract the Python 3.6 package.
elinuxbook@ubuntu:~/Downloads$ tar -xvf Python-3.6.0.tar.xz # Extract the Package
Package is extracted successfully as shown on the output below.
elinuxbook@ubuntu:~/Downloads$ ls
Python-3.6.0 Python-3.6.0.tar.xz
Now just go in to the Python-3.6.0 directory and run configure script as shown below.
elinuxbook@ubuntu:~/Downloads$ cd Python-3.6.0/ elinuxbook@ubuntu:~/Downloads/Python-3.6.0$ ls aclocal.m4 Doc LICENSE Objects pyconfig.h.in config.guess Grammar Mac Parser Python config.sub Include Makefile.pre.in PC README configure install-sh Misc PCbuild setup.py configure.ac Lib Modules Programs Tools elinuxbook@ubuntu:~/Downloads/Python-3.6.0$ ./configure
After complete the configure script process now run sudo make.
elinuxbook@ubuntu:~/Downloads/Python-3.6.0$ sudo make
Finally run sudo make install to complete the python 3.6 installatiom process.
elinuxbook@ubuntu:~/Downloads/Python-3.6.0$ sudo make install
We are successfully installed the Python 3.6 package on Ubuntu 16.04, Now to open the package type command python3. Refer the output below.
elinuxbook@ubuntu:~$ python3 Python 3.6.0 (default, Mar 6 2017, 09:49:55) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
So This is how we can install Python 3.6 on Ubuntu 16.04.
If you found this article useful then Like Us, Share Us, Subscribe our Newsletter OR if you have something to say then feel free to comment on the comment box below.
Thanks for detailed tutorial. Is there any reason to `sudo make` instead of just `make` ?
using “sudo” is a good practice during execution of any command or during installation of any package…
This is very useful
Thank you so much for finding the article useful.