Python — one of the most popular programming languages used in web development, data analysis, artificial intelligence and more. CentOS, a popular Linux server distribution, is often used in corporate environments. This article will show you how to install Python 3.10 on CentOS 7.
Step 1: Upgrade CentOS 7
Before installing new software, it is recommended that you update your system packages to the latest versions.
To upgrade your CentOS system, please do:
sudo yum update -y
After the update is complete, reboot the system:
Step 2: Install the required development tools
Install the necessary development tools to build Python 3.10 on CentOS 7:
sudo yum groupinstall "Development Tools" -y sudo yum install openssl-devel libffi-devel libffi-devel bzip2-devel -y
Check if gcc is available:
Step 3: Download the Python 3.10 archive
First, install the wget command:
sudo yum install wget -y
Now download the Python 3.10 archive:
Extract the archive file:
tar xvf Python-3.10.0.tgz
Go to the folder you created:
Step 4: Install Python 3.10 on CentOS 7
To start installing Python, do the following:
./configure --enable-optimizations sudo make altinstall
After successful installation, check the Python version:
Also make sure you have pip3.10:
Installing Python modules on CentOS 7
Python modules extend the functionality of the language. The Python Package Manager (PIP) can be used to install them. If PIP is not installed:
sudo yum install python3-pip
To install a specific module:
sudo pip install module-name
For example, installing a cython module:
python3 -m pip install cython
The list of installed packages can be found like this:
Closure: We hope this guide to installing Python 3.10 on CentOS 7 has been helpful. Now you are ready to use Python to develop various applications and programs.
We hope this guide to installing Python 3.10 on CentOS 7 has been helpful. Now you are ready to use Python to develop various applications and programs.