# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl

# On RHEL, enable RHSCL repository for you system:
$ sudo yum-config-manager --enable rhel-server-rhscl-7-rpms

# 2. Install the collection:
$ sudo yum install python27

# 3. Start using software collections:
$ scl enable python27 bash


- add source to the path

 cp /opt/rh/python27/root/usr/lib/python2.7 /usr/lib/python2.7

 cp /opt/rh/python27/root/usr/bin/python2.7 /usr/bin/

 cp /opt/rh/python27/root/usr/bin/python2.7-config /usr/bin/

 ln -snf /usr/bin/python2.7

 ln -snf /usr/bin/python2.7-config /usr/bin

 cp /opt/rh/python27/root/usr/lib64/libpython2.7.so /usr/lib64/

 cp /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64//usr/lib64/

 cp python27/root/usr/bin/pip2.7 /usr/bin/

 cp /opt/rh/python27/root/usr/bin/easy_install-2.7 /usr/bin/

 easy_install --upgrade pip


[ref]

https://github.com/h2oai/h2o-2/wiki/installing-python-2.7-on-centos-6.3.-follow-this-sequence-exactly-for-centos-machine-only

https://www.softwarecollections.org/en/scls/rhscl/python27/

'Programming > Python' 카테고리의 다른 글

pip 설치 및 재설치  (0) 2018.10.22
[python] 다양한 정규식 패턴 표현  (0) 2018.10.12
[argparse] FLAGS parser 사용법  (0) 2017.08.24
matplotlib.pyplot 설치하기  (0) 2017.08.24
사용자 입력 / 옵션으로 입력 받기  (0) 2017.08.14

+ Recent posts