How to Install Python 3.13 on Almal Linux 10
Introduction
This guide explains how to install Python 3.13 on RHEL 10 or AlmaLinux 10 by compiling it from source, since it is not available in the default repositories. The steps include preparing the system, installing required development packages, building Python, and verifying the installation.
Step 1: Update the system
Keeping the system updated ensures compatibility during the build process.
Step 2: Install development tools and dependencies
Python 3.13 requires several libraries and build tools. Install the necessary packages:
Install the Development Tools group to provide compilers, linkers, and other utilities required for building software:
Verify that GCC is available:
Step 3: Download, build, and install Python 3.13
Download the Python 3.13.4 source code:
Extract the archive:
Navigate into the extracted directory:
Configure the build with optimizations and shared library support:
Compile the source code:
Note:
The compilation process can take a significant amount of time depending on the system’s CPU performance. On typical VPS or dedicated servers, building Python from source usually requires 10 to 30 minutes, but it may vary depending on your hardware configuration.
Install Python without overriding the system version:
Verify the installation:
Verify OpenSSL support
Run Python:
Inside the Python shell:
Test basic functionality:
Step 4: Install Python packages using pip3.13
Check pip installation:
Upgrade pip:
Install any Python module:
Example using awscli:
Inspect package details:
pip3.13 show awscli
Install a specific version:
Install using a version range:
Upgrade an installed package:
Conclusion
Python is a great option for anyone wishing to learn or adopt a programming language for a variety of applications and projects due to its adaptability, simplicity, and capabilities. There are many libraries, frameworks, and tools available that let you create creative applications quickly.