选择python的版本

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/using-python3_configuring-basic-system-settings

6.2.3. Configuring the unversioned Python

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:

  1. Run the following command:

    alternatives --config python
  2. Select the required version from the provided list.

To reset this configuration and remove the unversioned python command, run:

alternatives --auto python

你可能感兴趣的:(python)