These links:
https://manpages.ubuntu.com/cgi-bin/search.py?q=update-alternatives
https://askubuntu.com/search?q=update-alternatives
... do not provide any direct insight into whether update-alternatives
actually can be used for e.g. using a more recent python, or pyside6 as an alternative for pyside2 (focal).
The man page for 20.04 states:
Different packages providing the same file need to do so cooperatively. In other
words,
the usage of update-alternatives is mandatory for all involved packages in such case. It
is not possible to override some file in a package that does not employ the
update-alternatives mechanism.
... which makes me wary of using it (for python and pyside6 specifically right now).
Any insights into actually using it for e.g. pyside6 specifically?
Noted after writing the above: no pyside6 available through apt-get.
So, the general answer to the usability of
update-alternatives
is:No
The packages has to cooperate regarding it.
w.r.t. Python and PySide6; Found one option each...
$ python -m pip install pyside6
... installs nicely on a fully updated 20.04 at least.
The newer python on the other hand...
I haven't tried it out yet (need a full backup first), but then:
The "deadsnakes ppa" seems to be a usable option - see
https://launchpad.net/%7Edeadsnakes/+archive/ubuntu/ppa
Google it: https://www.google.se/search?q=ubuntu+deadsnakes+ppa