Installing Python: Linux

This lesson is a tutorial on how to install Python in a Linux environment.

Installation is a slightly different process for every operating system. This lesson is a guide for installing Python on Linux. You can move on to the next lesson if this isn’t relevant to you.

Python in Linux

Many Linux distributions come with a pre-installed version of Python. Older distributions can have Python 2.7, whereas the newer ones may come equipped with the latest version. However, this is not a guarantee.

Below, we’ll highlight the different approaches for ensuring that our Linux machine has the latest Python installed. For simplicity, we’ll show the process for Ubuntu.

Checking the Version

The first step should always be to check if there is a version of Python and/or Python3 already installed. For this, simply have to go to the terminal and enter the following commands:

Python2

Get hands-on with 1200+ tech skills courses.