Python 3.14 introduces experimental free-threaded mode (no GIL), an improved REPL, deprecation of several legacy APIs, and template string literals (t-strings). Ubuntu 26.04 LTS ships with Python 3.14 as the default system Python. This guide installs and manages Python 3.14 on Ubuntu 26.04 LTS.
Tested and valid on:
- Ubuntu 26.04 LTS
Prerequisites
- Ubuntu 26.04 LTS server or desktop
- A user with sudo privileges
Step 1 – Check the Default Python Version
python3 --version
Step 2 – Install Python 3.14 from Ubuntu Repos
sudo apt update
sudo apt install python3.14 python3.14-venv python3.14-dev -y
Step 3 – Install pip
sudo apt install python3-pip -y
pip3 --version
Step 4 – Install Build Dependencies
Some pip packages require compilation:
sudo apt install build-essential libssl-dev libffi-dev python3-dev -y
Step 5 – Build Python 3.14 from Source (optional, latest)
sudo apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev
wget https://www.python.org/ftp/python/3.14.0/Python-3.14.0.tar.xz
tar xf Python-3.14.0.tar.xz && cd Python-3.14.0
./configure --enable-optimizations
make -j$(nproc)
sudo make altinstall
python3.14 --version
Step 6 – Verify and Test
python3.14 --version
python3.14 -c "import sys; print(sys.version)"
Step 7 – Update Alternatives (optional)
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.14 1
python3 --version
Conclusion
Python 3.14 is available on Ubuntu 26.04 LTS. Use virtual environments for project isolation, pip for package management, and pyenv for managing multiple Python versions in development.