This is the easier method of the two for installing Python on your machine. Here, we simply add a repository that has the pre-compiled version ready for us to install. In this case, we are adding the Inline with Upstream Stable repository, a community project whose goal is to bring new versions of software to RHEL-based systems.
Step 1: Open a Terminal and add the repository to your Yum install.
Step 2: Update Yum to finish adding the repository.
Step 3: Download and install Python.
This will not only install Python – but it will also install pip to help you with installing add-ons.
Once these commands are executed, simply check if the correct version of Python has been installed by executing the following command:
You have now finished installing Python 3.6.4 on your CentOS 7 machine, as well as installing a native Python package management tool called pip.