How to Install Python 3.9 on CentOS 7 Jesse OwensUpdated on March 21, 2025 1 Minute Read One of the most popular programming languages is Python, used in everything from low-level scripting to high-level application development. As of 2020, Python 3 has taken the place of its predecessor, Python 2. Python 3 can be installed on most modern operating systems, including Windows and CentOS. In this article, we will outline how to install Python 3.9 on CentOS 7. Installing Python Package Manager PIP Before we can install the Python package manager, PIP, we need to enable additional software repositories using the following command:sudo yum install epel-release Next, install PIP using the following command:sudo yum install python-pip Finally, confirm that the installation was successful using the following command:pip --version If successful, the system should display the PIP version as well as your current Python version. Installing Python 3.9 Now that we have PIP installed, we can proceed with installing the latest version of Python, 3.9. Before installing Python you will first need to install the requisite software packages using the following command: sudo yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel Once that is done, navigate to the /usr/local/src directory:cd /usr/local/src Download the latest version of Python using the wget command as follows:wget https://www.python.org/ftp/python/3.9.21/Python-3.9.21.tgz Once the file is downloaded, extract it using the following command:tar -xvf Python-3.9.21.tgz Once the file has extracted, move into the directory that was createdcd Python-3.9.6 Configure the installation using the following command:./configure —-prefix=/usr/local/ Run the following command:sudo make Next, build Python using the following command:sudo make altinstall After the installation process has finished, confirm the version using the following command:python3.9 --version Congratulations, you have successfully installed Python 3.9 and PIP! Trust your business to an industry leader in fast and reliable website hosting solutions. InMotion Hosting offers secure web hosting with 99.99% uptime, 24/7 expert human support, and 100% money-back guarantee. Share this Article Related Articles How to Send Files to the Trash Can in Linux with Gio Trash Engrampa Archive Manager for Linux Understanding Linux Operating Systems How to Install Python 3.9 on CentOS 7 Speed Up grep Searches with LC_ALL=C How To Install RubyGems On Linux unrar and rar Commands 5 Ways to Find a File in Linux Setting Your PHP Settings in Command Line How to Check the Memory Usage on Linux