I recently upgraded one of my Linux boxes from Debian 10 to 11.
Did the usual: Looked at the release notes and changed sources.list entries and finalized with apt-get update && apt-get dist-upgrade.
After this, everything once done and I rebooted my computer for a good measure.
When the new system was up, all C++ based programs worked but python programs had issues.
I noticed that some packages had gone missing (or more likely) were removed during the upgrade to solve conflicts. Pyqt5 was not there and this needed to be fixed. Here is how the situation was remedied:
sudo apt-get update && sudo apt-get reinstall python3-qt5* && apt-get install python-minimal
Lastly, I noticed that the linkage from python3 to python was gone. I fixed that with:
sudo ln -s /usr/bin/python3 /usr/local/bin/python
Now all was good and functional. Keep in mind that depending on your existing package configurations, your experience might be different.