How to Install Python 3.15 on Ubuntu

Deepak Prasad
Tested on Ubuntu 26.04 LTS (host)
Ubuntu 24.04 LTS & 22.04 LTS (Docker)
Package python3.15 — 3.15.0-1+resolute1 (26.04)
3.15.0-1+noble1 (24.04)
3.15.0-1+jammy1 (22.04) — all Deadsnakes
Lab environment Host: Resolute Raccoon
Containers: public.ecr.aws/ubuntu/ubuntu:24.04 and :22.04 (PPA, install, venv verified 2026-10-18)
Applies to Ubuntu 22.04 LTS, 24.04 LTS, and 26.04 LTS; commands tested on amd64
Privilege sudo for apt and PPA; normal user for pyenv, uv, and venv
Scope Install stable Python 3.15 beside Ubuntu's system python3 on every supported LTS—Deadsnakes is the usual apt path. For method comparison and source builds, see install latest Python on Ubuntu.
Related guides Install Python 3.14 on Ubuntu
create a Python package
Flask SQLAlchemy
pip command not found
Short on time?Beta Get the gist of this 7-minute read in seconds, then ask follow-up questions

Install Python 3.15 when you want the current stable CPython line beside Ubuntu's default python3—not as a replacement for the distro interpreter.

Use 3.15 when you need newer language or runtime features, want to test a project against the current CPython release, or a dependency explicitly supports or requires 3.15—not because apt failed to upgrade system python3.

Python 3.15 (October 2026):

  • 3.15.0 is the current stable feature release (final October 9, 2026)
  • Older install guides may still describe 3.15 as alpha/beta or show prerelease Deadsnakes package names (for example 3.15.0~a8)—verify with python.org and apt-cache policy python3.15 instead
  • None of these Ubuntu LTS releases uses Python 3.15 as its distro-managed python3; install it through Deadsnakes, uv, or pyenv beside the release default

Feature overview: What's new in Python 3.15.

Pick an install path:

            ┌─────────────────────────────────┐
            │ Need Python 3.15 on Ubuntu?     │
            └────────────────┬────────────────┘
                             │
          ┌──────────────────┴──────────────────┐
          ▼                                     ▼
┌─────────────────────────┐     ┌─────────────────────────────┐
│ APT-managed side-by-side│     │ User-level / many versions  │
└────────────┬────────────┘     └──────────────┬──────────────┘
             ▼                        ┌────────┴──────────┐
┌─────────────────────────┐           ▼                   ▼
│ Deadsnakes PPA          │         ┌────┐            ┌───────┐
│ (3.15.x on LTS)         │         │ uv │            │ pyenv │
└─────────────────────────┘         └────┘            └───────┘

Quick answer: Python 3.15 on Ubuntu by release

Ubuntu System python3 Python 3.15 source Recommended path
26.04 LTS 3.14 series Deadsnakes 3.15.0 on resolute Deadsnakes, uv, or pyenv
24.04 LTS 3.12 series Deadsnakes on noble Deadsnakes, uv, or pyenv
22.04 LTS 3.10 series Deadsnakes on jammy Deadsnakes, uv, or pyenv

Confirm your row with check Ubuntu version before enabling a PPA.


Python 3.15 on Ubuntu 26.04, 24.04, and 22.04

On every LTS in this guide:

  • python3 stays on the release default — 3.14 (26.04), 3.12 (24.04), or 3.10 (22.04)
  • python3.15 is an extra interpreter from Deadsnakes (or uv/pyenv)
  • Project libraries belong in a venv—Ubuntu .deb modules target system python3, not Deadsnakes builds

Install Flask on Ubuntu shows the same venv workflow once python3.15 exists.


Before you install: keep Ubuntu's system Python unchanged

Do not:

  • Run sudo update-alternatives --config python3 to switch the system default
  • Replace or symlink over /usr/bin/python3
  • Remove the distro python3 package during cleanup

Do instead:

  • Call python3.15 or activate a venv created with that binary
  • Leave python3 on the release default

Verify after install:

bash
readlink -f /usr/bin/python3
dpkg -S "$(readlink -f /usr/bin/python3)"
python3 --version
python3.15 --version

dpkg -S confirms Ubuntu still owns the system interpreter package (for example a python3.14 or python3.12 .deb on your release—not python3.15 from Deadsnakes).

Expected series (patch levels change with updates):

Ubuntu python3 python3.15
26.04 3.14.x 3.15.x
24.04 3.12.x 3.15.x
22.04 3.10.x 3.15.x

Install Python 3.15 with Deadsnakes

Deadsnakes notes:

  • Community-maintained third-party PPA—not Canonical's default archive
  • Publishes python3.15 for jammy, noble, and resolute
  • Maintainers do not guarantee the same security-update cadence as Ubuntu's official packages

Add the Deadsnakes PPA for Python 3.15 on Ubuntu

Enable the PPA with add-apt-repository when needed:

bash
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update

Verify the Python 3.15 package source on Ubuntu

Run apt-cache policy before you install so the candidate comes from Deadsnakes and the correct suite:

bash
apt-cache policy python3.15

Confirm:

  • Candidate is from ppa.launchpadcontent.net/deadsnakes/ppa
  • Suite is resolute (26.04), noble (24.04), or jammy (22.04)

Example on Ubuntu 26.04:

output
python3.15:
  Candidate: 3.15.0-1+resolute1
  Version table:
     3.15.0-1+resolute1 500
        500 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu resolute/main amd64 Packages

On 24.04 and 22.04, expect package names such as 3.15.0-1+noble1 and 3.15.0-1+jammy1 on the tested amd64 images. Patch numbers change when the PPA publishes new builds.

Deadsnakes may also publish specialized builds (for example free-threaded python3.15-nogil). This guide uses the standard python3.15 interpreter most projects expect.

Install Python 3.15 and venv

Install the interpreter and venv module, then compare python3.15 to system python3:

bash
sudo apt install python3.15 python3.15-venv
python3.15 --version
python3 --version

Example output after install:

Ubuntu python3.15 --version python3 --version
26.04 Python 3.15.0 Python 3.14.4
24.04 Python 3.15.0 Python 3.12.3
22.04 Python 3.15.0 Python 3.10.12

Optional development headers

Install python3.15-dev only when compiling C extensions or building against Python headers:

bash
sudo apt install python3.15-dev

Create a Python 3.15 virtual environment

A venv does not install Python 3.15—it isolates packages around an interpreter that already exists.

bash
python3.15 -m venv ~/venvs/py315
source ~/venvs/py315/bin/activate

With the venv active, confirm both the interpreter and pip point into the venv:

bash
python --version
python -m pip --version
python -m pip install --upgrade pip

Sanity-check common modules:

bash
python -c "import ssl, sqlite3, bz2, lzma; print('Python 3.15 OK')"

On all three LTS releases, keep project packages inside the 3.15 venv. On current Ubuntu releases, system python3 may be marked externally managed under PEP 668—do not rely on sudo pip or pip install --break-system-packages on /usr/bin/python3. See pip command not found if pip is missing outside a venv.

Deactivate with deactivate.


Alternative: Install Python 3.15 with uv

uv fits user-level Python without a PPA:

bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.15
uv venv --python 3.15 .venv
source .venv/bin/activate
python --version

Alternative: Install Python 3.15 with pyenv

pyenv compiles CPython under ~/.pyenv/versions/. Full setup: install latest Python on Ubuntu.

bash
pyenv install 3.15.0
pyenv local 3.15.0
python --version

Custom tarball builds stay on the latest-Python page.


Update Python 3.15

When Deadsnakes publishes a newer 3.15.x build:

bash
sudo apt update
sudo apt install python3.15 python3.15-venv

uv: uv python upgrade 3.15
pyenv: install the newer patch and update .python-version or pyenv local.


Uninstall Python 3.15

Ubuntu 22.04, 24.04, and 26.04

Inspect what you installed:

bash
apt-cache policy python3.15
dpkg -l | grep '^ii  python3.15'

Remove only the Deadsnakes packages you added (omit python3.15-dev if you never installed it):

bash
sudo apt remove python3.15 python3.15-venv
  • venv directories are not removed by apt remove—delete ~/venvs/ or ./.venv yourself
  • uv — remove the managed 3.15 install with uv python uninstall 3.15 when no environments still depend on it
  • pyenv — pyenv uninstall 3.15.0 (or the exact patch you installed) when you no longer need that build

Drop the Deadsnakes PPA only when no other Deadsnakes Python packages still need it:

bash
sudo add-apt-repository --remove ppa:deadsnakes/ppa
sudo apt update

Broader cleanup: Uninstall Python on Ubuntu.


Troubleshooting Python 3.15 on Ubuntu

Symptom Likely cause Fix
Unable to locate package python3.15 PPA missing or stale indexes Add Deadsnakes, sudo apt update, apt-cache policy python3.15
python3 shows 3.14 / 3.12 / 3.10 Expected Use python3.15 or a venv
python3.15 -m venv fails python3.15-venv missing sudo apt install python3.15-venv
externally-managed-environment pip against system python3 Create a venv; use python -m pip inside it
pip targets wrong Python venv not active or PATH issue Activate venv; use python -m pip
apt breaks after changing python3 System interpreter retargeted Restore Ubuntu python3 packages; avoid update-alternatives on python3
Another guide says 3.15 is still beta or preview Article written before 3.15.0 final (October 9, 2026) 3.15.0 is stable—confirm on python.org and apt-cache policy python3.15
python3.15 works but import fails for your project Packages installed into another interpreter Activate the 3.15 venv; install with python -m pip inside it

Summary: install Python 3.15 on Ubuntu

Python 3.15 installs beside Ubuntu's default python3 on 22.04, 24.04, and 26.04.

  • Deadsnakes — python3.15, python3.15-venv, verify with apt-cache policy
  • uv / pyenv — user-level interpreters
  • Safety — never repoint /usr/bin/python3; use venvs and python -m pip

For a full comparison of methods (including source builds), use install latest Python on Ubuntu.


References


Frequently Asked Questions

Is Python 3.15 stable on Ubuntu?

Yes—upstream 3.15.0 is stable. Deadsnakes ships python3.15 for jammy, noble, and resolute. It remains separate from Ubuntu's default python3 package.

Will installing python3.15 change python3?

No on a correct install. python3 should remain the release default (3.14 on 26.04, 3.12 on 24.04, 3.10 on 22.04).

Do I need python3.15-venv?

Yes for Deadsnakes on most setups—install it before python3.15 -m venv.

Should I use Deadsnakes on Ubuntu 26.04 for 3.15?

For python3.15 installed through APT beside system 3.14, yes—Deadsnakes is the practical APT-based option at the time of writing. Prefer uv or pyenv when you want interpreters only under your home directory.

Finished reading?Beta Get the key takeaways in seconds, then ask follow-up questions
Omer Cakmak

Linux Administrator

Highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on OpenStack, KVM, Proxmox, and VMware.

  • Debian
  • Ubuntu
  • Linux
  • Red Hat Enterprise Linux
  • Shell Script
  • System Administration