On a RHEL 8.3 system I have two python3 versions installed and they show up as the version when I list alterantives' versions:
$ alternatives --display python3
/usr/bin/python3.6 - priority 1000000
slave easy_install-3: /usr/bin/easy_install-3.6
slave pip-3: /usr/bin/pip-3.6
slave pip3: /usr/bin/pip3.6
slave pydoc-3: /usr/bin/pydoc3.6
slave pydoc3: /usr/bin/pydoc3.6
slave pyvenv-3: /usr/bin/pyvenv-3.6
slave python3-man: /usr/share/man/man1/python3.6.1.gz
/usr/bin/python3.9 - priority 3900
slave easy_install-3: /usr/bin/easy_install-3.9
slave pip-3: /usr/bin/pip-3.9
slave pip3: /usr/bin/pip3.9
slave pydoc-3: /usr/bin/pydoc3.9
slave pydoc3: /usr/bin/pydoc3.9
slave pyvenv-3: (null)
slave python3-man: /usr/share/man/man1/python3.9.1.gz
Current `best' version is /usr/bin/python3.6.
How can I use the alternatives
command to choose the already listed python3.9
as the used version? (I.e. system-wide I want to execute python3.9
when I type on the command line python3
).
Note: I understand I can add a new version with alternatives --install
(and then make it the best one with a high priority), but how can I choose an already listed version as the best (and used) one?
/usr/libexec/platform-python
. If you want to script system administration on RHEL8, then rather stick to 3.6