Skip to content

Instantly share code, notes, and snippets.

@EnigmaCurry
Created March 22, 2015 15:27
Show Gist options
  • Save EnigmaCurry/b4a572344084dcbfe1d9 to your computer and use it in GitHub Desktop.
Save EnigmaCurry/b4a572344084dcbfe1d9 to your computer and use it in GitHub Desktop.
Building an older version of Python for use in virtualenv
PREFIX=/opt/python
VERSION=2.7.8
mkdir -p $PREFIX/src
cd $PREFIX/src
wget https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tar.xz
tar xfv Python-$VERSION.tar.xz
cd Python-$VERSION
./configure --prefix=/opt/python/Python-$VERSION
make
make install
# Now virtualenv's can be created like:
# virtualenv --python=$PREFIX/Python-$VERSION/bin/python env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment