
Step 3 – compile Python source code into binariesĪt the moment we have everything ready for compiling the actual Python source code. To do that perform this set of bash commands.

We download the a source code of latest Python from the official Python page and extract Python-3.10.8.tgz to the /tmp directory. Step 2 – download and unpack Python source code sudo yum -y install wget yum-utils gcc openssl-devel bzip2-devel libffi-devel I chose the minimal amount of packages those are included in CentOS as well. You also need some necessary libraries and developer tools to allow you to build and compile software from source code. Let’s update your CentOS with the yum command. It is a good idea to have up-to-date OS system before you start doing anything else. Step 1 – prepare CentOS for Python compilation You will need functional Linux CentOS 7, 8 or 9 machine, an access to the root account and of course an internet connection.Īll the steps you can perform as an non-root user but with a support of the sudo command.

COPY & PASTE cheatsheet – for installing latest Python 3.11, 3.10, 3.9, 3.8 or 3.7 on Linux CentOS 7, 8, 9
