How to Install Python on Ubuntu [Easy Way]

Python install in ubantu 16.04

This article will help you to install Python on Ubuntu operating system. To know more about this version visit Python official website.

Python is an open source, portable, free, customization, effective and modern programming language that offers a wide range of attractive functionality and allows application developers to create software projects that are fully compatible with all mainstream operating systems.

python-on-ubuntu

Step #1 – Prerequsites

You must have fulfilled all the prerequisites for installing Python on Ubuntu. Use the following command to install all the prerequisites. After that go for the Python installation on Ubuntu.

$ sudo apt-get install build-essential checkinstall 
$ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

Step #2 Download Python Latest Version

You can download the python from official site. You can also download latest version using the below command.

$ cd /opt 
$ wget https://www.python.org/ftp/python/3.5.6/Python-3.5.6.tgz

Now extract the downloaded package.

$ sudo tar xzf Python-3.5.6.tg

Step #3 Install Python using Source Code

Now use below commands to compile python source code on your system.

 $ cd Python-3.5.6
$ sudo ./configure
$ sudo make
$ sudo make install

Note: If you want to used to prevent replacing the default python binary file /usr/bin/python.

$ cd Python-3.5.6 
$ sudo ./configure
$ sudo make altinstall

Step #4 Check the Python Version

Finally, you have successfully installed Python latest version like 3.6 on your system. Now you can check the version using below command.

$ sudo python3.5 -V 
Python 3.5.6

Enjoy It 🙂

Latest Article How To Install Plesk on CentOS 7

Avatar

About the Author: contact@dataparadise.net

Leave a Reply