Install Python 3.14 on CentOS Stream 10

Python is a high-level, interpreted, and general-purpose programming language known for its simple syntax and readability. It is widely used for web development, automation, data analysis, artificial intelligence, machine learning, system administration, and software development.

This guide explains how to install Python 3.14 from source without affecting the system Python version.

Method 1 - One-Line Installation (Quick Install)

Installation Location: Python will be installed at: /usr/local/bin/python3.14

Run the following command to install Python 3.14

dnf install -y dnf-plugins-core && dnf config-manager --set-enabled crb && dnf update -y && dnf groupinstall -y "Development Tools" && dnf install -y zlib-devel bzip2-devel ncurses-devel gdbm-devel nss-devel openssl-devel readline-devel libffi-devel sqlite-devel wget curl xz-devel tk-devel llvm libnsl2-devel && cd /usr/src && wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz && tar xzf Python-3.14.0.tgz && cd Python-3.14.0 && ./configure --enable-optimizations && make -j$(nproc) && make altinstall

Method 2 - Step-by-Step Installation

Step 1: Update System and Install Dependencies

dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb
dnf update -y
dnf groupinstall -y "Development Tools"
dnf install -y zlib-devel bzip2-devel ncurses-devel gdbm-devel \
nss-devel openssl-devel readline-devel libffi-devel sqlite-devel \
wget curl xz-devel tk-devel llvm libnsl2-devel

Step 2: Download Python 3.14 Source Code

cd /usr/src
wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tgz
tar xzf Python-3.14.0.tgz
cd Python-3.14.0

Step 3: Compile and Install Python

./configure --enable-optimizations
make -j$(nproc)
make altinstall

Step 4: Verify Python Installation

python3.14 --version

Step 5: Install pip for Python 3.14

python3.14 -m ensurepip
python3.14 -m pip install --upgrade pip

Step 6: Set Python 3.14 as Default (Optional)

python3.14 -m venv myenv
source myenv/bin/activate

Uninstall Python 3.14 (If Needed)

rm -rf /usr/local/bin/python3.14
rm -rf /usr/local/lib/python3.14

CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS