On Fri, Jun 23, 2023 at 01:06:05AM +0200, Yoann LE BARS wrote: > As far as I know, Python is not part of backports. Is there any way > other > than pinning to install the last stable version of Python on a stable > version of Debian?
Drop the idea that you have only one version of python3 installed, and that this version comes from Debian repositories. Keep the python3 that's provided by Debian, for Debian's use. It's part of package management and so on, and you really can't mess with it without breaking something. Install *additional* versions of python3 as you need them, for your own development work. I'll let the Python experts describe how to do this, if you don't already know how. Last I heard, you're supposed to set up one python venv (virtual environment) for each version, but that information might be outdated. This same principle applies to most programming languages. If Debian ships a compiler/interpreter for your language, then leave that version alone. Don't try to "upgrade" it. If you need another version (older or newer or just one with experimental patches), install that version separately, in parallel with the Debian version.