Last active
August 29, 2015 13:56
-
-
Save JohnPreston/9312234 to your computer and use it in GitHub Desktop.
Setup Python 2.7 on CentOS
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
# | |
# Setup python 2.7 in addition to 2.6.6 on CentOS 6 | |
# | |
# prerequisites repos | |
sudo yum groupinstall "Development tools" -y | |
sudo yum install wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel mysql-devel -y | |
#python sources | |
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz | |
tar xf Python-2.7.6.tar.xz | |
cd Python-2.7.6 | |
# compile | |
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib" | |
make && make altinstall | |
# setup easy_install and pip for 2.7 | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py --no-check-certificate | |
python2.7 ez_setup.py | |
easy_install-2.7 pip | |
# My Essential | |
pip2.7 install virtualenv | |
pip2.7 install supervisor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment