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:
-
Run the following command:
alternatives --config python
- Select the required version from the provided list.
To reset this configuration and remove the unversioned python
command, run:
alternatives --auto python