https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/using-python3_configuring-basic-system-settings
System administrators can configure the unversioned python
command on the system using the alternatives
command. Note that the required package, either python3
or python2
, needs to be installed before configuring the unversioned command to the respective version.
To configure the unversioned python
command to Python 3 directly, run:
alternatives --set python /usr/bin/python3
Use an analogous command if you choose Python 2.
Alternatively, you can configure the unversioned python
command interactively:
Run the following command:
alternatives --config python
To reset this configuration and remove the unversioned python
command, run:
alternatives --auto python