Hello,
I’ve installed v3.13.3t with PEP703 support in an Ubuntu 24.04 system (which already included a v3.12 version). The interpreter seems to be working OK but I simply cannot install pip. If I try using the package manager ($ sudo apt-get install python3-pip), the OS will install pip for v3.12, which is not what I want. When I try a semi-manual installation
$ python -m ensurepip --upgrade
/usr/bin/python3.13t: No module named ensurepip
It doesn’t seem to have ensurepip. I’m not sure if pip would need to be installed from source or which would be the workaround this issue.
Thanks.
Do you absolutely need to use the distro package for 3.13t? You can use pyenv to build Python from source if you don’t mind having compilers and some system libraries installed.
Hi @ngoldbaum,
Thank you for the reply. The problem is that once python is installed, I need to build a long list of apps on top of it and, in the past, some dependencies have caused some issues (more particularly those needed by PyQt and QGIS). I guess that the only way to assess if everything can work together is to try a clean installation, which I’ll do first thing tomorrow.
I’m not sure how to proceed. I’d expect modules such as ‘threading’ to work (otherwise how would I control the free threading) but, for example, ‘numpy’ wouldn’t work (or I wouldn’t even be able to build it) because there is no version compatible with free threading (I understand that numpy blocks the GIL by itself).
Do you absolutely need distro packages for the Python libraries? You can use pip to install binary wheels for many packages, for example.
I agree though based on what you and Barry have observed that the linux distros seem to be packaging free-threaded Python in a way that assumes you don’t need packages, which is pretty suboptimal. Given what you’ve found, I don’t think it’s tenable to rely on them to experiment with free-threading.
Lots of packages with native extensions are shipping free-threaded wheels.
I’m a NumPy maintainer, we ship free-threaded wheels, I’m not sure what’s holding up distros from following suit. As far as I know, we haven’t heard from any distros about shipping free-threaded NumPy builds.
I would need to find the distro packaging discussions about this to see whether it’s about confidence in upstream, not wanting to re-do packaging work, or some other reason.