How To Install Python 3.10 on CentOS 7 | CentOS 8 Linux Systems

This guide explains how to install Python 3.10 on CentOS 7 and CentOS 8 Linux systems. We have a similar guide for those users on Ubuntu and Debian-based systems such as LinuxMint among others.

Because the default CentOS repositories do not carry the latest version of Python we need to use the methods described below to install Python 3.10 on CentOS 7 or 8.

Step 1: Update Your CentOS 7 or CentOS 8 System

You need to be logged in as a non-root user with sudo privileges in order to follow along with this tutorial. Open the terminal and execute the following commands to update the installed packages.

  1. $ sudo yum -y install epel-release
  2. $ sudo yum -y update

Reboot the system after the completion of the updates:

  1. $ sudo reboot

Step 2: Install Python Dependencies

Install required software development tools required to build the Python 3.10 source on CentOS 8 / CentOS 7:

  1. $ sudo yum groupinstall "Development Tools" -y
  2. $ sudo yum install openssl-devel libffi-devel bzip2-devel -y

Step 3: Download latest Python 3.10 Archive

At this point, if you do not have wget on your system then you can install it using this command

  1. $ sudo yum install wget -y

Use wget to download Python 3.10 Archive:

  1. wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tgz

Extract the archive file using tar:

  1. $ sudo tar xvf Python-3.10.2.tgz

Switch to the directory created from the file extraction:

  1. $ cd Python-3.10.2

Step 4: Configure and Install Python 3.10 on CentOS 7 and 8

Run this command to configure the build parameters:

  1. $ ./configure --enable-optimizations

Now build the Python 3.10 source using this command:

  1. $ sudo make altinstall

After a little while the build should complete successfully and can be confirmed using this command:

  1. $ python3.10 --version
  2. Python 3.10.2

Pip 3.10 will have been installed and you can run this command to confirm the pip installation:

  1. $ pip3.10 --version
  2. pip 22.0.2 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)

Conclusion

That’s all there is to it. You now have the latest version of Python 3.10 on CentOS 7 | CentOS 8. Remember you can check the latest version of Python from the source release page.

[

See also OOVCDE C++ Automated Analysis Gets an Update

](https://brightwhiz.com/oovcde-c-automated-analysis-gets-an-update/)

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Further Reading:

How To Install Python 3.10 on CentOS 7 _ CentOS 8 Linux Systems - 图1How To Install Python 3.9 on Ubuntu, Debian, or Linux Mint How To Install Python 3.10 on CentOS 7 _ CentOS 8 Linux Systems - 图2How to Install Python 3 on Windows Systems With Examples How To Install Python 3.10 on CentOS 7 _ CentOS 8 Linux Systems - 图3How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems How To Install Python 3.10 on CentOS 7 _ CentOS 8 Linux Systems - 图4When to Use Margin vs Padding in CSS How To Install Python 3.10 on CentOS 7 _ CentOS 8 Linux Systems - 图5How To Install Git on CentOS 7 With Examples How To Install Python 3.10 on CentOS 7 _ CentOS 8 Linux Systems - 图6CSS Box-Sizing to Stop Padding and Borders From Resizing Elements