Oracle Linux 7 doesn’t come with Python 3 by default but only with Python 2. Luckily, installing Python 3 can be done with two simple steps:
sudo yum install -y oracle-epel-release-el7
sudo yum install -y python36
The first step installs and enables the Oracle EPEL yum repository (EPEL – Extra Packages for Enterprise Linux) which includes the Python 3.6 version. In case the repository is already installed, yum
will detect that and do nothing. So nothing will go wrong if you execute the command unnecessarily or twice.