Sunday, December 9, 2018

Installing Python3 on CentOS and how to use it.

Installing Python3 on CentOS 7 system using Software Collections (SCL) along side the default distribution python 2.7

Software collections (SCL) is a community project helps to build, install and use different versons of same software on same system without affecting default packages.

The python2.7 is teh default version which gets installed with CentOS and this help to run programs like yum etc.

To install python3, firstly, install SCL
sudo yum install centos-release-scl

Then, depending of you python version choice among python3.3, 3.4, 3.5, 3.6 run below command.
sudo yum install rh-python36

This will install python 3.6

Now to use python3.6, you need to run.
scl enable rh-python36 bash

Above command will enable python3.6 only for this session.

Verify by
python --version

***

No comments:

Post a Comment