Skip to content

Instantly share code, notes, and snippets.

@jace
Created December 22, 2016 04:43
Show Gist options
  • Select an option

  • Save jace/25935fa2e748928e98b3394e9bb8730d to your computer and use it in GitHub Desktop.

Select an option

Save jace/25935fa2e748928e98b3394e9bb8730d to your computer and use it in GitHub Desktop.

Revisions

  1. jace created this gist Dec 22, 2016.
    23 changes: 23 additions & 0 deletions upgrade.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #!/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