
Step 1: Update CentOSįirst, get the download link for the version of Python that you plan on installing from this page. The instructions are pretty similar to 3.10.

Which should return the exact version of Python (3.10.2) How to Install Python 3.11 on CentOS After it’s done, you can verify if you installed Python 3.10.2 with the following command: python3.10 -V configure -enable-optimizationsĪnd finally, compile Python (without replacing the default version): make altinstall To install the Python version you just downloaded, cd into the directory: cd Python-3.10.2 In this tutorial, we’ll be using Python 3.10.2.ĭownload the file with the command below: wget Īnd extract the archive with: tar -xzf Python-3.10.2.tgz Step 4: Install Python 3.10 Next, we need to install some packages: yum install openssl-devel bzip2-devel libffi-devel yum groupinstall "Development Tools" Step 3: Download Pythonįirst, get the download link for the version of Python that you plan on installing from this page. The first step, as always, is to update your system with the following command: yum update Step 2: Install necessary packages

Now, onto our tutorial on how to install Python 3.10 on CentOS (any version) Step 1: Update CentOS If you want to install Python 3.10 or 3.11, follow the tutorial below. To install it, just run yum install python39 and that’s it. The EOL of Python 3.9.6 is Oct 2025, so you can use that version.

3.6 reached its EOL in Dec 2021, so you should upgrade ASAP. Python 3.6.8 is the latest version available in the CentOS 7 repos.That version has reached its EOL years ago, so you should upgrade ASAP. Recommended read: Best Linux Distro for Programming Default Versions of Python in CentOSĭepending on when you’re reading this or what version you’re using, the version that you have installed by default or the version that’s available in the CentOS repo might be different. If Python is installed, one or both commands will give you an output of the version that’s installed. To check what version of Python you have installed (if any), run the following commands: python -V python3 -V On some systems, Python may already be installed. If you need a server, you can get one from Linode, or choose another Linux VPS provider.This tutorial will work for CentOS 7, CentOS 8, AlmaLinux, Rocky Linux, and other RHEL-based distros. SSH access to the server, or just use Terminal if you’re on a desktop.Root access or a user with sudo privileges.This is what you’ll need for this tutorial: This tutorial includes instructions for Python 3.10 and Python 3.11 on CentOS 7 and CentOS 8.Īlternative tutorial: How to install Python on Ubuntu. In this tutorial, we’re going to show you how to install Python (the latest version) on CentOS with step-by-step instructions.
