How To

How To Install Python 3.14 on Amazon Linux 2023

Python is known to be a powerful and easy to learn programming language. It is designed to be efficient, simple but with effective approach to object-oriented programming. Python is an ideal language for scripting and rapid application development because of its elegant syntax and dynamic typing, together with its interpreted nature. In this short tutorial I’ll show you how to quickly install Python 3.14 in Amazon Linux 2023 server.

Original content from computingforgeeks.com - post 82364

Python 3.14 is the newest major release of the Python programming language as of the time when this article is updated. This release contains many new features and optimizations. Among the major new features of Python 3.14 series releases as compared to 3.14 are:

Install Python 3.14 on Amazon Linux 2023

The key focus for this article is to help you install Python 3.14 on Amazon Linux 2023. There are many standard libraries freely available in source or binary form for all major platforms from the Python Web site, https://www.python.org/ which can be used to extend Python features.

Installing Python 3.14 from the source

If you’re performing this installation at later time when there is a newer release you may find latest version in the extras repository.

For manual installation you need to update system and install dependencies.

sudo yum -y update
sudo yum -y groupinstall "Development Tools"
sudo yum -y install openssl-devel bzip2-devel libffi-devel

Once dependencies are installed, you can then download the latest archive of Python 3.14 release.

sudo yum -y install wget
wget https://www.python.org/ftp/python/3.14.2/Python-3.14.2.tgz

Extract the package.

tar xvf Python-3.14.2.tgz

Change the created directory:

cd Python-3.14*/

Setup installation by running the configure script.

./configure --enable-optimizations
How To Install Python 3.14 on Amazon Linux 01

Initiate compilation of Python 3.14 on Amazon Linux 2023.

sudo make altinstall
How To Install Python 3.14 on Amazon Linux 03 scaled 1

Confirm installed version of Python:

$ python3.14 --version
Python 3.14.2

Setting Default Python version for your user on Amazon Linux 2023

The default version of Python available is 3.9 and newer Python versions (e.g., 3.14.x) are installed under /usr/local/ and NOT meant to replace system Python. This is by design because replacing the system Python would break system tools such as dnf, which you don’t want.

$ python3 -V
Python 3.9.25

You can interactively call Python 3.14 interpreter with python3.14 command:

$ python3.14 -V
Python 3.14.2

To set Python 3.14 as the default python for your user, you can do so by setting up your own aliases:

echo 'alias python3="/usr/local/bin/python3.14"' >> ~/.bashrc
echo 'alias python="/usr/local/bin/python3.14"' >> ~/.bashrc
source ~/.bashrc

Use python command to check current default version.

How To Install Python 3.14 on Amazon Linux 04

Python 3.8 has been installed successfully in our Amazon Linux 2023 server.

Other articles on Amazon Linux are:

Related Articles

AlmaLinux Install NetBeans IDE on Rocky Linux 8|AlmaLinux 8 CentOS How To Install Python 3.9 on CentOS 8 / CentOS 7 Programming How to Install PHP 8.4 on Garuda|Arch|Manjaro AlmaLinux Install Python 3 / Python 2.7 on Rocky Linux 8 |AlmaLinux 8

Leave a Comment

Press ESC to close