How to get Python 3.10 on Rocky Linux 8 / Alma Linux 8 / Fedora 35

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Hello, friends. There are tutorials that sometimes you think you do not need but come the moment gives us a headache. Today, you will learn how to get Python 3.10 on Rocky Linux 8 / Alma Linux 8 / Fedora 35 quickly and easily.

What’s new in Python 3.10

Python is perhaps the most popular programming language in the world. And it is one of the main components of any Linux distribution.

So, it’s no wonder that many developers require the latest stable version to test or improve their applications.

In this sense, Python 3.10 includes interesting new features such as

  • Parenthesized context managers
  • Better error messages
  • IndentationErrors
  • Parameter Specification Variables

And many more that you can read in this link.

How to get Python 3.10 on Rocky Linux 8 / Alma Linux 8 / Fedora 35

In this tutorial, we will not replace the version of Python that the system has. Instead, we will install it in parallel to avoid problems. This also favors the developers that will be able to choose between one or another version for their programs.

First, in a terminal or SSH session, update the whole system to avoid issues.

sudo dnf update

Now install some packages needed to make the post.

sudo dnf install wget yum-utils make gcc openssl-devel bzip2-devel libffi-devel zlib-devel 

These packages are varied, from downloadable tools to compilers and libraries.

After we have the dependencies covered, we can download Python 3.10.

wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tgz
1.- Get Python 3.10 on Rocky Linux 8
1.- Get Python 3.10 on Rocky Linux 8

Now unzip it using the tar command.

tar xzf Python-3.10.2.tgz 

Instantly access the folder that has been generated

cd Python-3.10.2 

Then, configure it with some extra options.

sudo ./configure --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions

Now compile it by running

sudo make

And perform an alternative installation of Python so as not to replace the system version.

sudo make altinstall

After the process finishes, you will be able to verify the installed version.

python3.10 -V

Once you have installed PIP, which is the Python package manager.

pip3.10 -V
2.- Python 3.10 running
2.- Python 3.10 running

This way, we will have Python 3.10 installed and ready for you to use it in your programs.

Conclusion

Python is essential for many developers who see it as the base language for their applications. If we take this to a global level, we will realize that Python is present in almost all our lives. Well, today we have shown you how to install version 3.10 on a system as popular as Fedora 35 / 34 or Rocky Linux 8.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook