If you replace the version of python that the upgrade process expects, then yeah, you'll probably run into problems. The upgrade process can't possibly support every single version of any given package, that would defeat the entire purpose of having a stable release cycle. If it's a core package like python which sits really close to the top of the dependency tree then the effects of swapping that out will cascade downward and that's why everything breaks so badly.
In my experience, this is the only safe way to have third party apt repositories:
- Don't install any third party packages which have reverse dependencies. This means no libraries, only applications. If you need newer libraries as a dependency then you have to statically compile the application.
- Don't install any third party packages which have the same name as an upstream package. If you want to install a newer third party version of an upstream package then you need to change the name of it and have it install all of its files in different locations. A prefix change is enough here, /opt is a popular choice.
- Delete all third party packages before doing an upgrade, in case a new upstream package happens to have the same name, or needs to put files in the same locations.
Do anything outside of that and you will risk getting your install into a broken state. Because even though you might think you are just installing some applications, what you are really doing is bolting things on to the upgrade process for the entire core system. Using nvm is perfectly safe though because that just installs the different versions to your home directory, it doesn't touch apt.