| 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 |
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
python3alone on 24.04 and 22.04 (defaults are 3.12 and 3.10). - On 26.04,
python3already 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 pipinside it—notsudo pipon 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:
. /etc/os-release && echo "$PRETTY_NAME"Check which CPU architecture APT uses on this machine:
dpkg --print-architectureOn 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:
python3 --version
readlink -f /usr/bin/python3On Ubuntu 26.04:
Python 3.14.4
/usr/bin/python3.14On 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:
sudo apt updateInstall the metapackage and venv module:
sudo apt install python3 python3-venvConfirm the running interpreter (patch level changes with security updates):
python3 --versionPython 3.14.4See which binary python3 invokes:
readlink -f /usr/bin/python3/usr/bin/python3.14Verify packages come from Ubuntu
Use the apt-cache command to separate the python3 metapackage from the python3.14 interpreter package:
apt-cache policy python3 python3.14On 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:
sudo apt install software-properties-commonEnable the PPA and refresh indexes:
sudo add-apt-repository ppa:deadsnakes/ppaRefresh indexes so APT sees the new PPA:
sudo apt updateVerify the Python 3.14 package source on Ubuntu
Before you install, confirm APT sees a candidate from Deadsnakes:
apt-cache policy python3.14You want:
- A numbered Candidate (not
Candidate: (none)) - A 500 line pointing at
ppa.launchpadcontent.net/deadsnakes/ppawith 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:
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 PackagesOn Ubuntu 22.04, the candidate uses suite jammy:
apt-cache policy python3.14python3.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 PackagesInstall Python 3.14 and venv
Install the versioned interpreter and its venv module:
sudo apt install python3.14 python3.14-venvCheck the new interpreter:
python3.14 --versionConfirm system python3 did not change series:
python3 --versionOn Ubuntu 24.04 after install:
Python 3.14.8
Python 3.12.3On Ubuntu 22.04, python3 stays on 3.10:
python3.14 --version
python3 --versionPython 3.14.8
Python 3.10.12python3 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:
command -v python3The 3.14 interpreter should have its own path:
command -v python3.14You 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:
/usr/bin/python3
/usr/bin/python3.14readlink -f /usr/bin/python3 still points at the distro default:
readlink -f /usr/bin/python3/usr/bin/python3.12On Ubuntu 22.04, the same checks show python3.10 as the default:
command -v python3
command -v python3.14
readlink -f /usr/bin/python3/usr/bin/python3
/usr/bin/python3.14
/usr/bin/python3.10Ubuntu 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
/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):
python3 -m venv ~/venvs/py314On 24.04 and 22.04, use the versioned binary:
python3.14 -m venv ~/venvs/py314Activate the environment so python and pip refer to the venv (valid for the current shell session):
source ~/venvs/py314/bin/activateYour 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:
python --versionConfirm pip is tied to that venv:
python -m pip --versionOn Ubuntu 26.04 after python3 -m venv:
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:
python --version
python -m pip --versionPython 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:
python -m pip install --upgrade pipInstall project dependencies only while the venv is active:
python -m pip install requestsPEP 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:
error: externally-managed-environmentUbuntu 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:
deactivatepython 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:
sudo apt remove python3.14 python3.14-venvThat 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
- Ubuntu Resolute
python3package - Ubuntu Resolute
python3.14package - Deadsnakes PPA
- PEP 668 — externally managed environments
- Python 3.14 documentation
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.

