On RHEL8 how can I use `alternatives` to choose an already listed version as the used version
3
votes
2
answers
16283
views
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?
Asked by halloleo
(649 rep)
Dec 2, 2021, 12:35 AM
Last activity: Nov 20, 2023, 03:39 PM
Last activity: Nov 20, 2023, 03:39 PM