How to Install Python3.14 from source on Ubuntu 26.04

Hacker News Top Tools

Summary

A step-by-step guide to installing Python 3.14 from source on Ubuntu 26.04, covering enabling deb-src, installing build dependencies, compiling, and using altinstall to avoid overwriting the system Python.

No content available
Original Article
View Cached Full Text

Cached at: 08/12/26, 08:25 AM

# How to Install Python3.14 from source on Ubuntu 26.04 – James O'Claire Source: [https://jamesoclaire.com/2026/08/06/how-to-install-python3-14-from-source-on-ubuntu-26-04/](https://jamesoclaire.com/2026/08/06/how-to-install-python3-14-from-source-on-ubuntu-26-04/) I’ve always been a big fan of installing Python from source\. It keeps you close to your environments and understanding exactly where the code comes from and goes to\. I feel like in the past it was more difficult, but year after year it seems like it’s getting easier\. This year for Ubuntu 26\.04 there is a bit of a new step added, but ultimately it is feeling effortless\. The whole process takes about 10 or so minutes, and is good for people of all levels to understand\. ## Prep for on a fresh install of Ubuntu 26\.04 [https://gist.github.com/ddxv/afc223b371e79b18fa42cbbab7867495#prep](https://gist.github.com/ddxv/afc223b371e79b18fa42cbbab7867495#prep)You may need a C compiler if you haven’t yet downloaded: `sudo apt update && sudo apt \-y install build\-essential` ## New Ubuntu sources need to add ‘deb\-src’ There is a new way to get the build\-deps for Python on Ubuntu, so you’ll need to edit`/etc/apt/sources\.list\.d/ubuntu\.sources`and add`deb\-src`to the Types line\. `sudo vim /etc/apt/sources\.list\.d/ubuntu\.sources` ``` Types: deb deb-src ``` Now that has been added you can get build\-deps for Python: ``` sudo apt update sudo apt build-dep python3 sudo apt install -y pkg-config ``` ## Install all the additional packages for python extras, you want these I generally install all additionals since many are quite important for python\. Some are more specialized and you may not use, while others like libcurses are basically required if you expect to ever need to interact with an interpreter \(eg troubleshooting a production environment\)\. Others you may not need until some future data, say when you install a package that expects a certain kind of data compression\. Overall, my advice is just install all unless you know more or have a specialized use case for streamlined environment\. ``` sudo apt -y install build-essential gdb lcov pkg-config libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev libncurses-dev libreadline-dev libsqlite3-dev libssl-dev lzma tk-dev uuid-dev zlib1g-dev libmpdec-dev libzstd-dev inetutils-inetd ``` ## Python 3\.14 Installation on Linux [https://gist.github.com/ddxv/afc223b371e79b18fa42cbbab7867495#installation---linux](https://gist.github.com/ddxv/afc223b371e79b18fa42cbbab7867495#installation---linux)Download the latest version: Choose Gzipped Tarball[https://www\.python\.org/](https://www.python.org/downloads/) 1. `curl \-O URL` 2. `tar \-xvf ZIPPEDPYTHONFILE`you will now have a directory like Python3\.12\.xxx 3. `sudo mv Python3\.12\.x /opt/`Move python installation directory to /opt/ to keep home clean 4. `cd /opt/Python3\.12\.x`into the directory and run each command 5. Check you have all packages installed from above 6. `\./configure \-\-enable\-optimizations` 7. `make`Builds Python, this step takes some time\. 8. `sudo make altinstall`altinstall skips creating the python link and the manual pages links, install will hide the system binaries and manual pages\. This means that we will leave the system python installation untouched Python is now installed\. Last important step is to configure the system links:`sudo ldconfig /opt/Python3\.14\.`x Finally you can test: `python3\.14`

Similar Articles

How Fast is Python 3.15?

Hacker News Top

Miguel Grinberg benchmarks Python 3.15 (3.15.0rc3) against CPython 3.10–3.14, PyPy, Node.js, and Rust using recursive and loop-based test programs across single- and multi-threaded modes, including JIT and free-threading variants.

Python 3.15.0 candidate 2 is here!

Simon Willison's Blog

Hugo van Kemenade announces the final release candidate for Python 3.15, scheduled for October, and encourages third-party maintainers to prepare their projects by testing and publishing wheels.

What's missing to have reproducible builds on PyPI

Lobsters Hottest

The article explores missing elements in Python packaging specifications for achieving reproducible builds, which would improve supply chain security by enabling independent verification of distributions.