Step 1 – Prerequisites

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

Step 2 – Download Python 3.5

Download Python source code archive from its official download website. You can also download Python 3.5 version using the following commands. Now extract the downloaded archive on your system.

Step 3 – Install Python on Linux

Use below set of commands to compile Python source code on your system using altinstall. This will install Python on an Ubuntu and LinuxMint system. make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

Step 4 – Check the Python Version

You have successfully installed Python on Linux. Check the Python version installed using the command: