I also using Debian 11, and this is how I always install Python from source:
wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0b3.tgz tar xvzf Python-3.11.0b3.tgz cd Python-3.11.0b3.tgz sudo apt install libssl-dev zlib1g-dev libbz2-dev liblzma-dev libffi-dev tcl-dev libgdbm-dev libsqlite3-dev libreadline-dev tk tk-dev libmpdec-dev ./configure --enable-loadable-sqlite-extensions --enable-shared --with-lto --enable-optimizations --with-system-expat --with-system-ffi --with-computed-gotos --with-system-libmpdec --enable-ipv6 CC=x86_64-linux-gnu-gcc make sudo make altinstall
python3.11: error while loading shared libraries: libpython3.11.so.1.0: cannot open shared object file: No such file or directory
I built it using CSS grid. It's not yet all finished, but now, I have more experience with CSS grid ;), so maybe I need to rewrite some parts again. And also, now CSS grid have a better support across browsers.
https://github.com/PyCon/2017-slides
I also using Debian 11, and this is how I always install Python from source: