Python is considered the a easy to learn language due to its simpler syntax and abundance of libraries and frameworks that allow for rapid development.

It is an interpreted general programming language and most new coders are learning to code using python.

► Play

We can do python programming using Linux, most of the Linux distributions come with the python interpreter pre-installed but it won’t be the latest version. In this article we are going to learn how to get python installed on some well-known Linux distributions.

Ubuntu

Ubuntu is one of the most famous Linux distributions. The recent versions of Ubuntu come with Python 3.6 pre-installed. You can check your Ubuntu version by using the following command:

Ubuntu 17.10, Ubuntu 18.04(and above): come with Python 3.6 pre-installed by default.

You can access the python interpreter by the following command:

Ubuntu 16.10 and Ubuntu 17.04: These versions of Ubuntu do not come with python 3.6 pre-installed. But it can be installed using the universe repository by using the following commands:

Ubuntu 14.04 and Ubuntu 16.04: These versions of ubuntu don’t have Python3.6 in the Universe library. We can get using a Personal Package Archive (PPA). 

We can use the “deadsnakes PPA” and install it using the following commands:

Linux Mint

Linux mint and Ubuntu have the same package management system. We can use the same commands to install Python:

CentOS

To install linux we first need to update the yum package manager:

We then need the IUS package to get the latest version of python:

Now we can get python installed on our system:

Fedora

Fedora’s current version and a few future versions will ship with Python2 as default. If we don’t have python3 installed on your system we can do so by using the following command:

Arch Linux

Arch Linux makes sure that you have the latest python version and its likely that you already have the latest version, however you can use the following command to get the latest version:

As of writing the latest version of Python is 3.7.4, you can get it by replacing the 3.6 with 3.7

Python is one of the fastest growing languages, so it’s best to have the latest version with the latest libraries.

Send us a feedback0/500

Do you like this article?
Yes
No