Skip to content

Instantly share code, notes, and snippets.

@junqueira
Created August 25, 2015 14:02
Show Gist options
  • Save junqueira/457b8a8d902c1908a49f to your computer and use it in GitHub Desktop.
Save junqueira/457b8a8d902c1908a49f to your computer and use it in GitHub Desktop.
# Install dependencies
yum groupinstall -y 'development tools'
yum install -y zlib-devel bzip2-devel openssl-devel xz-libs wget
# Download the Python source and unpack it
wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
xz -d Python-2.7.9.tar.xz
tar -xvf Python-2.7.9.tar
# Enter the directory, configure, and install
cd Python-2.7.9
./configure --prefix=/usr/local
make
make altinstall
# Check the Python version with `python2.7 -V` and make sure
# /usr/local/bin is in your `PATH` with `echo $PATH`. If not
# do `export PATH="/usr/local/bin:$PATH"`
# Install `setuptools`
cd ..
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-14.0.tar.gz
tar -xvf setuptools-14.0.tar.gz
cd setuptools-14.0
python2.7 setup.py install
# Install `pip`
curl https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python2.7 -
# Install `virtualenv`
pip2.7 install virtualenv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment