Latest

Wednesday, 8 June 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 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.

# 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)... 199.232.44.223, 2a04:4e42:48::223
Connecting to www.python.org (www.python.org)|199.232.44.223|: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]

How to Install Python 3.10 on Rocky Linux

Extract downloaded tarball as follows.

# tar -xf Python-3.10.4.tar.xz

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

# cd 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

 

Conclusion:

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? Don't you mind support us by Buy Me A Coffee


No comments:

Post a Comment

© 2022 CentLinux. All Rights Reserved.