Skip to content

Instantly share code, notes, and snippets.

@dnozay
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnozay/20ffbae3fda3a8671c96 to your computer and use it in GitHub Desktop.
Save dnozay/20ffbae3fda3a8671c96 to your computer and use it in GitHub Desktop.
centos - install python 2.7.8 on cento 6.5
cd /tmp
sudo yum install -y openssl-devel zlib-devel bzip2-devel wget
VERSION=2.7.8
wget https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz
tar -xvzf Python-${VERSION}.tgz
cd Python-${VERSION}
# ./configure \
# --prefix=/usr/local \
# --enable-unicode=ucs4 \
# --enable-shared \
# LDFLAGS="$LDFLAGS -Wl,-rpath /usr/local/lib -L/lib64 -L/usr/lib64"
# --enable-shared does not seem to work properly with LDFLAGS/python2.7.8
./configure \
--prefix=/usr/local \
--enable-unicode=ucs4 \
LDFLAGS="$LDFLAGS -Wl,-rpath /usr/local/lib -L/lib64 -L/usr/lib64"
make
sudo make altinstall
cd ..
# install setuptools, pip and virtualenv
wget https://bootstrap.pypa.io/ez_setup.py -O ez_setup.py
sudo /usr/local/bin/python2.7 ez_setup.py
sudo easy_install-2.7 pip
sudo pip2.7 install virtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment