Skip to content

Instantly share code, notes, and snippets.

@jace
Created December 22, 2016 04:43
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 jace/25935fa2e748928e98b3394e9bb8730d to your computer and use it in GitHub Desktop.
Save jace/25935fa2e748928e98b3394e9bb8730d to your computer and use it in GitHub Desktop.
Upgrade Python 2.7 virtualenv under Homebrew
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: $0 <venv_dir>"
else
rm $1/bin/pip
rm $1/bin/pip2
rm $1/bin/pip2.7
rm $1/bin/python
rm $1/bin/python2
rm $1/bin/python2.7
rm -r $1/include/python2.7
rm $1/lib/python2.7/*
rm -r $1/lib/python2.7/distutils
rm $1/lib/python2.7/site-packages/easy_install.*
rm -r $1/lib/python2.7/site-packages/pip
rm -r $1/lib/python2.7/site-packages/pip-*.dist-info
rm -r $1/lib/python2.7/site-packages/setuptools
rm -r $1/lib/python2.7/site-packages/setuptools-*.dist-info
rm $1/.Python
virtualenv $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment