2 Installing Python
To install Python 3.12 on an Oracle Linux 10 system:
sudo dnf install python3 The python3 command points to Python 3.12 if it's installed on the system. To
verify that behavior, run the following command:
python3 --versionIn Oracle Linux 10, all unversioned Python commands point to Python 3.12 and can't be
configured to run on newer Python versions by using the alternatives
command.
To optionally enable the unversioned python command, install the
python-unversioned-command package:
sudo dnf install /usr/bin/pythonNote:
Python 3.12 is maintained for the full lifespan of Oracle Linux 10.
Application Stream packages, such as more recent versions of Python 3, have their own major version releases and have shorter maintenance lifespans. For more information, see Oracle Linux: Product Life Cycle Information.
Installing Extra Python Libraries
You can also install extra dependencies from the Oracle Linux yum server. For example, to
install the requests library for the default runtime version of Python 3, you
would install the python3-requests package:
sudo dnf install python3-requestsDependencies that are installed in this way are available for any compatible Python installations on the same system. In addition, any matching packages can also be removed without also removing existing Python installations.