Python is an interpreted, high-level, general-purpose programming language that lets you work more quickly and integrate your systems more effectively. Python is developed under an OSI-approved open source license, making it freely usable and distributable, even for commercial use. Python's license is administered by the Python Software Foundation.

In this guide, we will explain how to install Python 3 on CentOS 7.

Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can easily deploy your own cloud servers.

Once you have signed up, log into your Cloudwafer Client Area with the password provided in your mail and deploy your Cloudwafer cloud server.

Updating System Packages
It is always recommended that you update the system to the latest packages before beginning any major installations. This is done with the command below:

sudo yum update

Step 1: Check Default Python Version
To check the default python version currently installed on your server, issue the command below:

python --version

Step 2: Install Software Collections (SCL)
Software Collections allows you to build, install, and use multiple versions of software on the same system, without affecting system-wide installed packages. Issue the command below to Software Collections:

sudo yum install centos-release-scl scl-utils-build

Step 3: Install Python 3

After installing SCL, issue the command below to install Python 3.

sudo yum install python33

Step 4: Make Python 3 the default
At this period, Python 2 is still our default shell. To run applications with Python 3, we are going to enable Python 3 from the SCL shell. Issue the command below to carry out this task:

scl enable python33 bash

Next, check the Python version:

python --version

Python 3 is now the default python interpreter.