Hello,
From CentOS 7 through Rocky 8, I have been using the ‘alternatives’ command to manage multiple python3 versions. As of Rocky 9, though, it seems that python3 is no longer managed by alternatives. When I do ‘alternatives –list’, python3 does not appear.
Can anyone speak about the change in direction and how best to manage multiple python3 versions installed on a single Rocky 9 host?
Thanks,
-jm
ls -l /usr/bin/python*
The python3
symlink is from package python3
(The python
symlink is from package python-unversioned-command
)
The system utilities do hopefully use the python3.9
explicitly.
In el8 they call “platform python” and python3.6
points to the “platform python”.
The scripts that you write could refer to explicit version. That way change of “the alternatives” does not break programs unknowingly.
One could have multiple python3
symlinks in different places and users would use environment modules utility to make particular place visible (first) on PATH when needed.
One could have python venvs and activate on need (as those too have symlinks and prepend to PATH).
I did like the platform-python idea and can only guess why it does not seem to continue.
Then again, I’ve never relied on the alternatives.