In today’s guide you’ll learn to install Python 3.9 on CentOS 8 / CentOS 7 Linux system. Python is general-purpose, interpreted and high-level programming language originally created by Guido van Rossum. Python is created for simplicity, deep integration and great extensibility. You can achieve much more with Python using powerful libraries and tools, including Django, Pygame, Matplotlib, Plotly, e.t.c.
In the next sections we look at the installation steps of Python 3.9 on CentOS 8 / CentOS 7. If you’re interested in a full list of features shipped in Python 3.9 check the official release notes.
Install Python 3.9 on CentOS 8 / CentOS 7
Python is a cross-platform software package meaning it can run on Linux, Windows, macOS, and BSD systems. As of this article update, the exact latest release of Python 3.9 is version Python 3.9.7. This is the version of Python that will be installed in this tutorial.
Step 1: Install Python Dependencies
Login to your CentOS 8 / CentOS 7 system as root or user with sudo privileges.
ssh *username*@*serveripaddress*
Then do system update
sudo yum -y install epel-release
sudo yum -y update
Reboot after the upgrade before you continue to install dependencies
sudo reboot
Install required software development tools required to build Python 3.9 on CentOS 8 / CentOS 7:
sudo yum groupinstall "Development Tools" -y
sudo yum install openssl-devel libffi-devel bzip2-devel -y
Confirm gcc is available:
$ *gcc --version
gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4) Copy