Skip to content

Instantly share code, notes, and snippets.

@damienstanton
Last active August 29, 2015 14:10
Show Gist options
  • Save damienstanton/f63c8aed8f4a432cfcf2 to your computer and use it in GitHub Desktop.
Save damienstanton/f63c8aed8f4a432cfcf2 to your computer and use it in GitHub Desktop.
Make a Virtualenv in Ubuntu 14.04 with Python 3.4
# Workaround for the ensurepip problem: https://lwn.net/Articles/592007/
# --------------------------------------
# Usage:
# Add this script to your path, then run
# env.sh my_virtualenv_name
# --------------------------------------
pyvenv-3.4 --without-pip $1
source ./$1/bin/activate
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.4.4.tar.gz
tar -vzxf setuptools-3.4.4.tar.gz
cd setuptools-3.4.4
python setup.py install
cd ..
wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz
tar -vzxf pip-1.5.6.tar.gz
cd pip-1.5.6
python setup.py install
cd ..
deactivate
source ./$1/bin/activate
rm -rf pip-1.5.6/
rm -f pip-1.5.6.tar.gz
rm -rf setuptools-3.4.4/
rm -f setuptools-3.4.4.tar.gz
printf $"\nDone! Please check that pip list returned good pip and setuptools versions.\n"
pip list
@mariomartinezsz
Copy link

Thanks, this script was really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment