Install Python 3 in CentOS 7

By | October 29, 2016

Introduction is a community project built around Red Hat Enterprise Linux, Fedora, CentOS, and Scientific Linux that allows installing and running multiple versions of software on a single system. The available collections typically include newer versions of programming languages and services.

This tutorial will describe setting up Software Collections (SCLs) in CentOS 7 and installing Python 3.3 along side the Python 2.7 distribution default.


  • CentOS 7 or Red Hat Enterprise Linux 7

Install Software Collections

The first step is to install the utilities needed to manage collections.

yum -y install scl-utils

The next step is to identify which software collection you want and to install the associated repository. A full list of available collections can be found at the following URL.

The Python33 collection repository package can be installed directly using RPM.

rpm -Uvh

Install Python 3

The Python 3 collection can now be installed using YUM.

yum -y install python33

Use Python 3

Python 3.3 will become accessible by launching a new shell instance using the Software Collection scl command.

scl enable python33 bash

The -V parameter will confirm the available Python version.

python -V

Additional Python libraries and tools, such as pip, can now be installed.

easy_install pip

It is important to remember to use the appropriate path to the new Python binary in your code.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.