In this week’s feature highlight, we look at How to Install Python 3.10 on Rocky Linux 9
Python is an interpreted high-level general-purpose programming language. Its design philosophy emphasizes code readability with its use of significant indentation. Its language constructs as well as its object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.
First, check for any pending system updates,
Install required packages.
dnf install gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make
Install Python 3.10.5
By default, Rocky Linux 9 comes with Python version 3.9
In this article, we will install the latest version of Python that is available, 3.10.5, on the Rocky Linux 9 system. You can check their official website to find the latest version available and download its source code.
Extract the downloaded file.
tar xzf Python-3.10.5.tgz
Change to the extracted directory with the following command.
Run configuration command.
Complete the Python installation on the Rocky Linux system by running the following command.
make -j 2
Once the Python has been installed, confirm the version that is available by,
[root@server Python-3.10.5]# python3.10 --version
Using pip on Python 3.10.5
Check the installed version of a pip by running the following command,
[root@server ~]# pip3.10 -V
pip 22.0.4 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)