How to Install Python 3.14 on Ubuntu

Deepak Prasad
Tested on Ubuntu 26.04 LTS (Resolute Raccoon)
Ubuntu 24.04 LTS (Noble Numbat)
Ubuntu 22.04 LTS (Jammy Jellyfish), amd64
Package python3.14 — 3.14.4-1ubuntu0.2 (26.04 archive)
3.14.8-1+noble1 (24.04 Deadsnakes)
3.14.8-1+jammy1 (22.04 Deadsnakes)
Applies to Ubuntu 22.04 LTS, 24.04 LTS, and 26.04 LTS (amd64; check PPA or archive on other architectures)
Privilege sudo for apt and PPA; normal user for venv and pip inside venv
Scope Install or use Python 3.14 on Ubuntu without replacing the distro python3 on 24.04 or 22.04. On 26.04, use Ubuntu apt (Deadsnakes is unnecessary for 3.14). For Python 3.15, see Install Python 3.15 on Ubuntu. For newest upstream or pyenv/uv, see Install latest Python on Ubuntu.
Related guides Install Python 3.13 on Ubuntu
Install Python 3.12 on Ubuntu
Uninstall Python on Ubuntu
pip command not found
Check Ubuntu version
Short on time?Beta Get the gist of this 11-minute read in seconds, then ask follow-up questions

Install Python 3.14 when your project, dependency, or CI image specifically requires the 3.14 series. The safe rule on every Ubuntu LTS:

  • Leave the distro python3 alone on 24.04 and 22.04 (defaults are 3.12 and 3.10).
  • On 26.04, python3 already is Python 3.14—use Ubuntu apt, not a PPA, to get 3.14.
  • Put project libraries in a virtual environment and use python -m pip inside it—not sudo pip on system Python.

Commands below were captured on Ubuntu 26.04, 24.04, and 22.04 (amd64). Patch levels change with archive and PPA updates—confirm candidates with apt-cache policy on your machine.


Quick answer: Python 3.14 on Ubuntu by release

Ubuntu System python3 Python 3.14 source Recommended path
26.04 LTS 3.14 series Official Ubuntu archive sudo apt install python3 python3-venv
24.04 LTS 3.12 series Deadsnakes PPA (at time of writing) python3.14 beside python3
22.04 LTS 3.10 series Deadsnakes PPA (at time of writing) python3.14 beside python3

If apt install cannot find python3.14 on 24.04 or 22.04, run apt-cache policy python3.14 before trying another method—the candidate should list the Deadsnakes PPA after you enable it.


Check your Ubuntu release and Python version

The install path depends on the release. Confirm with check Ubuntu version or:

bash
. /etc/os-release && echo "$PRETTY_NAME"

Check which CPU architecture APT uses on this machine:

bash
dpkg --print-architecture

On the systems used for this guide, that command reports amd64. If you see another value (for example arm64), confirm that the Ubuntu archive or Deadsnakes publishes python3.14 for your release and architecture before you continue.

See what python3 points at today:

bash
python3 --version
readlink -f /usr/bin/python3

On Ubuntu 26.04:

output
Python 3.14.4
/usr/bin/python3.14

On 24.04 you should still see 3.12.x for python3 until you deliberately install and use python3.14. On 22.04, python3 should remain 3.10.x.


Install Python 3.14 on Ubuntu 26.04

Ubuntu 26.04 ships Python 3.14 as the operating-system interpreter. You do not need the Deadsnakes PPA just to obtain 3.14—use the official archive.

Install Python 3.14 and venv

Refresh indexes, then install the metapackage and venv module:

bash
sudo apt update

Install the metapackage and venv module:

bash
sudo apt install python3 python3-venv

Confirm the running interpreter (patch level changes with security updates):

bash
python3 --version
output
Python 3.14.4

See which binary python3 invokes:

bash
readlink -f /usr/bin/python3
output
/usr/bin/python3.14

Verify packages come from Ubuntu

Use the apt-cache command to separate the python3 metapackage from the python3.14 interpreter package:

bash
apt-cache policy python3 python3.14

On the tested 26.04 system, python3 showed metapackage 3.14.3-0ubuntu2 from resolute/main, while python3.14 showed interpreter 3.14.4-1ubuntu0.2 from resolute-updates. That is normal: python3 --version reports the interpreter (3.14.4), not the metapackage revision.

Both packages should come from an Ubuntu archive or Ubuntu mirror for Resolute, not from the Deadsnakes PPA.


Install Python 3.14 on Ubuntu 24.04 and 22.04

On Noble (24.04) and Jammy (22.04), the main archive does not make 3.14 the default python3. Install python3.14 as a second interpreter and keep using python3 for the distro default.

What is the Deadsnakes PPA?

A PPA (Personal Package Archive) is an extra APT software source hosted on Launchpad. Deadsnakes is a widely used community PPA—not part of Ubuntu’s default archive—that ships alternate Python versions for supported Ubuntu releases.

At the time of this guide, Deadsnakes publishes python3.14 for noble and jammy. Availability can change; always verify with apt-cache policy on your machine.

Installing python3.14 from Deadsnakes does not change /usr/bin/python3 unless you manually reconfigure alternatives or symlinks—which this guide does not do.

Add the Deadsnakes PPA for Python 3.14 on Ubuntu

Install helpers if add-apt-repository is missing—see add-apt-repository command not found:

bash
sudo apt install software-properties-common

Enable the PPA and refresh indexes:

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

Refresh indexes so APT sees the new PPA:

bash
sudo apt update

Verify the Python 3.14 package source on Ubuntu

Before you install, confirm APT sees a candidate from Deadsnakes:

bash
apt-cache policy python3.14

You want:

  • A numbered Candidate (not Candidate: (none))
  • A 500 line pointing at ppa.launchpadcontent.net/deadsnakes/ppa with suite noble on 24.04 or jammy on 22.04

If the candidate is missing, re-run sudo apt update or check that the PPA supports your Ubuntu release and architecture.

On Ubuntu 24.04:

output
python3.14:
  Installed: (none)
  Candidate: 3.14.8-1+noble1
  Version table:
     3.14.8-1+noble1 500
        500 http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble/main amd64 Packages

On Ubuntu 22.04, the candidate uses suite jammy:

bash
apt-cache policy python3.14
output
python3.14:
  Installed: (none)
  Candidate: 3.14.8-1+jammy1
  Version table:
     3.14.8-1+jammy1 500
        500 http://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 Packages

Install Python 3.14 and venv

Install the versioned interpreter and its venv module:

bash
sudo apt install python3.14 python3.14-venv

Check the new interpreter:

bash
python3.14 --version

Confirm system python3 did not change series:

bash
python3 --version

On Ubuntu 24.04 after install:

output
Python 3.14.8
Python 3.12.3

On Ubuntu 22.04, python3 stays on 3.10:

bash
python3.14 --version
python3 --version
output
Python 3.14.8
Python 3.10.12

python3 stays on the 3.12 or 3.10 series; only python3.14 reports 3.14.x.

You do not need python3.14-dev or python3.14-tk for a normal interpreter and venv setup. Install -dev only when building extensions that require Python headers, and -tk only when an application uses Tkinter.

Confirm system python3 did not change

List which binaries are on your PATH:

bash
command -v python3

The 3.14 interpreter should have its own path:

bash
command -v python3.14

You should see two paths under /usr/bin/ (for example /usr/bin/python3 still resolving to 3.12 or 3.10, and /usr/bin/python3.14 for 3.14).

On Ubuntu 24.04:

output
/usr/bin/python3
/usr/bin/python3.14

readlink -f /usr/bin/python3 still points at the distro default:

bash
readlink -f /usr/bin/python3
output
/usr/bin/python3.12

On Ubuntu 22.04, the same checks show python3.10 as the default:

bash
command -v python3
command -v python3.14
readlink -f /usr/bin/python3
output
/usr/bin/python3
/usr/bin/python3.14
/usr/bin/python3.10
Ubuntu 24.04 / 22.04
        |
        +---- system python3 (3.12 or 3.10) unchanged
        |
        +---- python3.14 from Deadsnakes
                    |
                    v
              project venv (packages here)

Do not replace Ubuntu's system Python

IMPORTANT
On Ubuntu 24.04 and 22.04, do not repoint /usr/bin/python3, run sudo update-alternatives --config python3 to switch the OS default, or remove the distro python3 packages. APT, cloud-init, and many system tools expect the release default—and they are tested against the Python version shipped with that release. Replacing the global python3 can break package management or other system utilities.

On Ubuntu 26.04, python3 is Python 3.14 by design. Do not remove python3.14 or the python3 metapackage because one project ended—delete that project’s venv instead.

Do not Do instead
sudo pip install into system python3 Create a venv; use python -m pip inside it
Replace /usr/bin/python3 with a symlink to python3.14 on 24.04/22.04 Call python3.14 explicitly or use a venv created with python3.14 -m venv
Purge python3 on 26.04 Remove only project venv directories under your home directory

Create a Python 3.14 virtual environment

A virtual environment (venv) is an isolated directory (often named .venv or under ~/venvs/) with its own python and pip. It keeps project packages separate from Ubuntu’s system site-packages, avoids sudo pip, and prevents one project’s dependencies from breaking another.

The tilde in ~/venvs/ means your home directory (for example /home/username/venvs/).

Create and activate the venv

On 26.04, create the venv with distro python3 (already 3.14):

bash
python3 -m venv ~/venvs/py314

On 24.04 and 22.04, use the versioned binary:

bash
python3.14 -m venv ~/venvs/py314

Activate the environment so python and pip refer to the venv (valid for the current shell session):

bash
source ~/venvs/py314/bin/activate

Your prompt may show (py314). Inside an activated venv, python is that environment’s interpreter—not necessarily the same as bare python3 on the host.

Verify Python and pip inside the venv

With the venv active, check the interpreter:

bash
python --version

Confirm pip is tied to that venv:

bash
python -m pip --version

On Ubuntu 26.04 after python3 -m venv:

output
Python 3.14.4
pip 25.1.1 from .../py314/lib/python3.14/site-packages/pip (python 3.14)

On Ubuntu 24.04 and 22.04, after python3.14 -m venv and source ~/venvs/py314/bin/activate:

bash
python --version
python -m pip --version
output
Python 3.14.8
pip 26.2.1 from .../venvs/py314/lib/python3.14/site-packages/pip (python 3.14)

Optional: upgrade pip inside the new venv:

bash
python -m pip install --upgrade pip

Install project dependencies only while the venv is active:

bash
python -m pip install requests

PEP 668 and externally managed environments

PEP 668 defines the externally managed mechanism, but enforcement depends on how the distribution packages each interpreter. Ubuntu 24.04 and 26.04 normally enforce it for the distro python3, so a global pip install may fail with:

text
error: externally-managed-environment

Ubuntu 22.04 and alternate interpreters (such as python3.14 from Deadsnakes) can behave differently depending on their packaging. The portable rule on all three releases is the same: install project packages inside a virtual environment (or use a user-level tool from install latest Python on Ubuntu) instead of sudo pip install on /usr/bin/python3.

Leave the virtual environment

Return to the system shell defaults:

bash
deactivate

python and pip return to the system defaults until you source .../bin/activate again.


Troubleshooting Python 3.14 on Ubuntu

Symptom Likely cause Fix
Unable to locate package python3.14 on 24.04 / 22.04 Deadsnakes PPA not enabled or stale indexes Add PPA, sudo apt update, apt-cache policy python3.14
Candidate: (none) for python3.14 Wrong suite, architecture, or PPA lag Confirm the Ubuntu release, check the architecture with dpkg --print-architecture, and verify package availability on the PPA
add-apt-repository: command not found software-properties-common missing add-apt-repository command not found
externally-managed-environment Global pip on system Python Activate a venv; python -m pip install ...
python3 still 3.12 or 3.10 after install Expected on 24.04/22.04 Use python3.14 or a venv; do not force-replace python3
python3.14 -m venv fails python3.14-venv not installed sudo apt install python3.14-venv
pip missing in venv Rare on current builds Re-create venv after installing python3.14-venv; see pip command not found

Uninstall Python 3.14

Ubuntu 24.04 and 22.04

Remove only the alternate 3.14 packages you added:

bash
sudo apt remove python3.14 python3.14-venv

That does not remove Ubuntu’s default python3 (3.12 or 3.10). Delete project venv directories yourself (rm -rf ~/venvs/py314).

Remove the Deadsnakes PPA only when no other Deadsnakes Python packages still need it. Broader patterns: Uninstall Python on Ubuntu.

Ubuntu 26.04

Do not remove python3, python3.14, or python3-venv to “uninstall Python 3.14”—that is the system interpreter. Remove project venvs and application code instead.


Summary: install Python 3.14 on Ubuntu

The correct Python 3.14 installation method depends on your Ubuntu release. On 26.04, install python3 and python3-venv from the official archive and verify with python3 --version and apt-cache policy—no Deadsnakes required for 3.14. On 24.04 and 22.04, add Deadsnakes, confirm apt-cache policy python3.14, install python3.14 and python3.14-venv, and check that python3 still reports 3.12.x or 3.10.x.

Keep the distro python3 untouched on older LTS releases, use python3.14 or a venv for application work, and respect PEP 668 by avoiding sudo pip on system Python. If you need Python 3.15 beside 3.14 on 26.04, use Install Python 3.15 on Ubuntu rather than repointing /usr/bin/python3.


References


Frequently Asked Questions

Is Python 3.14 the default on Ubuntu 26.04?

Yes. On 26.04, the distro python3 metapackage depends on Python 3.14. After updates, python3 --version may report a newer 3.14.x patch than the metapackage version string in apt-cache policy python3.

Should I install python3.14 from Deadsnakes on Ubuntu 26.04?

No for normal use. 26.04 already provides Python 3.14 in the official archive. Deadsnakes is for installing alternate minors on releases that do not ship them as python3.

Will installing Python 3.14 change python3 on Ubuntu 24.04 or 22.04?

No—not when you install the versioned python3.14 package normally. python3 should stay on 3.12 (24.04) or 3.10 (22.04). Do not manually replace /usr/bin/python3 or reconfigure update-alternatives for the system default.

How do I install packages for Python 3.14 on Ubuntu?

Create a Python 3.14 virtual environment, activate it, then run python -m pip install ... inside the venv. Avoid sudo pip install against Ubuntu’s system python3.

Why does apt show python3 3.14.3 but python3 --version shows 3.14.4?

The python3 metapackage revision (3.14.3-0ubuntu2) is not the same field as the interpreter patch (python3.14 3.14.4). Trust python3 --version and apt-cache policy python3.14 for the running interpreter.

Is the Deadsnakes PPA part of Ubuntu?

No. Deadsnakes is a community-maintained Launchpad PPA, not Ubuntu’s official archive. 26.04 does not need it for Python 3.14; this guide uses it on 24.04 and 22.04 because those releases keep older system Python versions. Run apt-cache policy python3.14 before you install so you know which source APT will use.

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