Last active
October 23, 2016 08:15
-
-
Save loinguyenduc101/edc7c9fd8ae1edc3a195327c36a09327 to your computer and use it in GitHub Desktop.
install python 2.7 on CentOS 6.x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scl enable python27 bash | |
#yum install centos-release-SCL | |
#yum install python27 | |
or make install from source | |
# wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | |
# tar xzf Python-2.7.12.tgz | |
# cd Python-2.7.12 | |
# ./configure --prefix=/usr/local | |
# make altinstall | |
check local python 2.7 | |
#whereis python | |
python: /usr/bin/python /usr/bin/python2.6 /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python2.7 /usr/local/bin/python2.7-config /usr/local/lib/python2.7 /usr/include/python2.6 /usr/share/man/man1/python.1.gz | |
create python alias | |
# vi /etc/profile | |
add to end of file | |
#alias python='/usr/local/bin/python2.7' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment