Skip to content

Instantly share code, notes, and snippets.

@jace jace/upgrade.sh
Created Dec 22, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.