

What the command above does is calling the script /opt/rh/rh-python36/enable, which changes the shell environment variables. To access Python 3.6 you need to launch a new shell instance using the Software Collection scl tool: scl enable rh-python36 bash

You will notice that Python 2.7 is the default Python version in your current shell. Once the package rh-python36 is installed, check the Python version To do so type the following command on your CentOS 7 terminal: sudo yum install rh-python36 Using Python 3 # In this tutorial, we will install Python 3.6, which is the latest version available at the time of writing. Currently, the following Python 3 collections are available: Now that you have access to the SCL repository, you can install any Python 3.x version you need. It is part of the CentOS extras repository and can be installed by running the following command: sudo yum install centos-release-scl Installing Python 3 on CentOS 7 # To enable SCL, you need to install the CentOS SCL release file. SCL allows you to install newer versions of python 3.x alongside the default python v2.7.5 so that system tools such as yum will continue to work properly. By enabling SCL you will gain access to the newer versions of programming languages and services which are not available in the core repositories.ĬentOS 7 ships with Python 2.7.5 which is a critical part of the CentOS base system. , also known as SCL is a community project that allows you to build, install, and use multiple versions of software on the same system, without affecting system default packages. Python 3 is the present and future of the language. Many popular applications and websites, including YouTube, DropBox, Reddit, Quora, Instagram, Pinterest have been developed using Python.

You can use it to do almost anything you want, write small scripts, build games, develop websites, create machine learning algorithms, analyze data, and more. Python is a quite versatile programming language. With its simple and easy to learn syntax Python is a great choice for beginners and experienced developers. Python is one of the most popular programming languages in the world. We will also show you how to create a Python virtual environment. This tutorial will guide you through installing Python 3 on a CentOS 7 system using the Software Collections (SCL) alongside the distribution default Python version 2.7.
