Install the Latest Python Version On Linux from Source

Python is a programming language known for its ease of use and readability. It is a high-level language, which means that it is designed to be easily understandable by humans.

Python was created in the 1980s by Guido van Rossum, and it has since become one of the most popular programming languages in the world.

This blog post will show you how to install the latest Python version from the Python website on your Linux machine without using a package manager.

The problem with installing Python from a package manager is that you need to update the repository list and select the correct version. This process can be a nightmare if installing the wrong package.

This post will save you time and give you the ability to install the latest release as they appear on the official python.org website.

Download Version

Let start with downloading the latest version of Python from the official Python website. Click on the link below and click again on the Linux/Unix option.

https://www.python.org/downloads/

Right-click on the latest stable release from the Linux/Unix page and copy the URL.

In our case, the URL is shown below.

https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tgz

From your Linux machine, use the wget command with the above URL to download the file to your Linux host.

wget https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tgz

After downloading the file, let’s unzip it with the command below.

tar -xvzf Python-3.10.1.tgz

Open the directory the files were extracted to

cd Python-3.10.1.tgz

Run the commands below to install Python.

./configure  --enable-optimizations
make
make altinstall

At this stage, Python 3.10.1 is installed on my Linux host.


Posted

in

by