Python 3.12 on the ubuntu-24.04 image (which is also slowly becoming ubuntu-latest) is using an "Externally Managed" instance of Python - either it was installed via a package manager (apt?) or it is ...