Your output strongly suggests that you have wrong-version (possibly wrong-release) sources that are trying to provide incompatible packages.
This kind of damage is easy to prevent, but it can be very difficult to fix. Bluntly, this kind of damage is usually caused by the choices of the human admin. For example, the upgrade window from 16.04 ended almost two years ago.
How to prevent it:
- Install packages from the Ubuntu repositories instead of upstream.
- NEVER change the system-provided release of Python3.
- If you want shiny new software, DON'T bolt it onto an LTS or older release. They are not designed for that. That just creates an un-maintainable Frankensystem.
- Keep track of the PPA and other non-Ubuntu sources that you add to your system. When the time for a release-upgrade comes, uninstall all that software and disable those sources. After the release-upgrade is complete, audit those sources to see what you really want to re-enable.
- Do not let your systems drift past the end of support date for their release. That makes upgrading much harder.
How to fix it - Option #1:
- Uninstall ALL non-Ubuntu software. Disable all PPAs and non-Ubuntu sources. Return your system to as close to stock condition as possible.
- Back up your data. Create a LiveUSB. Be prepared to reinstall if you encounter problems. Your output suggests the problems are likely.
- Run the release-upgrade. Check your output carefully for issues you created due to incompletely following Step #1.
- Since a Release-upgrade of 16.04 will take you to 18.04...and 18.04 loses support in a few months (not years), do another release-upgrade to 20.04. Or maybe yet another to 22.04.
How to fix it - Option #2:
- Back up your data and clean-install a newer release of Ubuntu.