CentLinux | Learn How to Install CentOS/Rocky Linux Servers

Wednesday, June 8, 2022

How to Install Python 3.10 on Rocky Linux

How to Install Python 3.10 on Rocky Linux

In this article, you will learn how to install Python 3.10 on Rocky Linux 8 or other RPM based distros.


Installing Python 3.10 Prerequisites:

Connect with your Rocky Linux server as root user by means of a ssh client.

Install Python 3.10 prerequistes by using dnf command.

# dnf install -y curl gcc openssl-devel bzip2-devel libffi-devel zlib-devel tar wget make


Installing Python 3.10 on Rocky Linux:

Download tarball of Python 3.10 from their official website. You can use wget or curl command for this purpose.

# cd /tmp
# wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tar.xz
--2022-04-23 21:46:50--  https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tar.xz
Resolving www.python.org (www.python.org)..., 2a04:4e42:48::223
Connecting to www.python.org (www.python.org)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19342692 (18M) [application/octet-stream]
Saving to: ‘Python-3.10.4.tar.xz’

Python-3.10.4.tar.x 100%[===================>]  18.45M   751KB/s    in 20s

2022-04-23 21:47:11 (947 KB/s) - ‘Python-3.10.4.tar.xz’ saved [19342692/19342692]



Extract downloaded tarball as follows.

# tar -xf Python-3.10.4.tar.xz -C /opt/

Change to extracted directory of Python and configure the downloaded Python source according to your Linux operating system.

# cd /opt/Python-3.10.4
# ./configure --enable-optimizations

Install Python 3.10 by using following commands.

# make -j 2
# make altinstall

Verify the version of installed Python as follows.

# python3.10 -V
Python 3.10.4



In this article, you have successfully installed Python 3.10 on Rocky Linux 8 or other RPM based distros.

If you want to develop some amazing projects in Python Proramming Language, then you should start with Python Crash Course, 2nd Edition by Eric Matthes.

Or you can buy an Online Course: Complete Python Tutorial for Beginners to speedup your learning process.

If you find this article useful? Consider supporting us by Buy Me A Coffee

No comments:

Post a Comment

© 2023 CentLinux. All Rights Reserved.