Python 3.12 + Debian 12: Available via Backports; Default Is Python 3.11
Python 3.12+Debian 12 (Bookworm)
Debian 12 (Bookworm) ships Python 3.11 as the default. Python 3.12 is available via the Debian backports repository. Python 3.12 removed `distutils` from the stdlib — after installing via backports, also install `python3.12-distutils` or `setuptools` to avoid build failures with older packages.
Workarounds & Fixes
Enable backports: add `deb http://deb.debian.org/debian bookworm-backports main` to /etc/apt/sources.list