CentOS 7
Sponsored Link

Install Python 3.62017/10/11

 
The version of Python in CentOS 7 repository is 2.7 but Install 3.6 with RPM package if you need.
[1] On CentOS 7.7 and later, Python3 packages are included in CentOS base repository, so it's easy to install it.
[root@dlp ~]#
yum -y install python3
# possible to run by [python3]

[root@dlp ~]#
python3 -V

Python 3.6.8
[2] On CentOS 7.6 and before, Python 3 is provided from CentOS SCLo Software Collections, so it's possible to install it from SCLo, too.
# install from SCLo

[root@dlp ~]#
yum --enablerepo=centos-sclo-rh -y install rh-python36
# switch python to load environment variables

[root@dlp ~]#
scl enable rh-python36 bash
[root@dlp ~]#
python -V

Python 3.6.2
[root@dlp ~]#
which python

/opt/rh/rh-python36/root/usr/bin/python
# to enable it at login, set like follows

[root@dlp ~]#
vi /etc/profile.d/python36.sh
# create new

source /opt/rh/rh-python36/enable
export X_SCLS="`scl enable rh-python36 'echo $X_SCLS'`"
Matched Content