How To Install Python 2.7.18 From The Source

Python programming

Python is a versatile and widely-used programming language. In this article, we will guide you through the process of installing Python 2.7.18 from the source on a Linux system.

Before we start, make sure your system is up-to-date. You can do this by running the following command:

sudo apt update

Next, install the necessary packages that Python requires for the installation:

sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

Create a new directory where you will download the Python source code:

mkdir ~/python2.7
cd ~/python2.7

Now, download the Python 2.7.18 source code from the official Python website:


Once the download is complete, extract the tarball:

tar xzf Python-2.7.18.tgz

Navigate into the extracted directory:

cd Python-2.7.18

You have now successfully downloaded and prepared Python 2.7.18 for installation from the source. The next steps would typically involve configuring and compiling the source code to install Python on your system.

Remember, Python 2.7.18 is no longer being maintained, and it’s recommended to use Python 3.x for new projects.

You may also like:

Related Posts

Leave a Reply