How to Install Python3.14 from source on Ubuntu 26.04(jamesoclaire.com) |
How to Install Python3.14 from source on Ubuntu 26.04(jamesoclaire.com) |
To illustrate my point with an example: Python packaging has a lot of cargo cult because the overwhelming majority of Python programmers don't understand what needs to be done to accomplish the task of packaging their code and don't know how to verify that what they wanted to do was actually done.
One such ironically stupid and ubiquitous (but relatively harmless) detail is this: Python programmers are told to use pyproject.toml in order to, beside other things, configure the build of their distributable binary package (if the project intends to have one). It is very common to have [dev] and [test] sections in this sort of configuration, which Programmers might believe to describe their development or testing requirements... however, instead, they describe feature dependencies. Something completely different from what their authors intended.
The reason this happens is that it makes it easy to install development and/or testing dependencies by typing eg. "pip install -e '.[dev]'". And nobody looks into the resulting package metadata, where all these dependencies are listed in their respective feature sections...
This is not the only stupid thing that goes into the generated package metadata. There's the useless "Dynamic" metadata field declaration that serves absolutely no purpose, but is added by the build tools (and nobody ever examines the output). I've found that a lot of even very popular Python packages never look into the output of their builds and package a lot of useless garbage with whatever code they distribute (eg. for a long time NumPy were packaging their unit tests together with the rest of their code...). Tools like uv and pipenv certainly help with obfuscation and, subsequently, worsening the quality of the output.
If you use uv or pipenv, not only do you not prevent this problem, you actually make it a lot harder to get rid of it, because now you've added another tool to your toolchain that can't be used to do the right thing and pushes you even harder in the direction of doing the wrong thing.
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).
You can add this PPA (personal package archive) to your Ubuntu install. Then you can use apt to do the install of the newer version.
https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
Just another alternative method, and potentially easier/faster.
I just like the flow where I know which version I'm on, and exactly the steps I took to get there. =D