Installing Python 3.14 from Source on Ubuntu 26.04: A Step-by-Step Guide

How to Install Python3.14 from source on Ubuntu 26.04

James O'Claire walks through compiling Python 3.14 from source on Ubuntu 26.04, a process that now includes a new step: adding 'deb-src' to the apt sources file to fetch build dependencies. He recommends installing all optional packages, as many are essential for common tasks like using the interactive interpreter. The guide covers downloading the tarball, configuring with optimizations, building, and using 'make altinstall' to avoid overwriting the system Python.

I feel like in the past it was more difficult, but year after year it seems like it’s getting easier.
  1. ddxv

    Just sharing this, I was doing my routine this morning with a couple new VMs and was thinking how much I like building my Python environments from source.

    Just wanted to share for anyone and show that it has certainly gotten easier over the years (though this year Ubuntu 26.04 did add a new step).

  2. cjfd

    Sure, it is quite easy to install python from source. Usually I am doing it because I need older version for work projects. Of course, the other thing that one needs in that kind of situations is virtual environments. This makes it also quite easy to ensure that you always run the correct python. Create a venv with a specific version of python and once you are in that venv, the 'python' command will automatically run that python version. That way it is easy to use an unlimited number of python version next to each other.

  3. supriyo-biswas

    In the age of uv (and pipenv before that), should we even go through the trouble of building Python manually?

More from this day

2026-08-12