Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setup virtual env and install packages
#!/bin/bash
[ $SHLVL = 2 ] && echo "Usage: . ${0##*/}" && exit
VIRTUALENVNAME=contours
if [ ! -d ~/python/$VIRTUALENVNAME ]
then
test -e ~/python || mkdir ~/python
pushd .
cd ~/python
virtualenv $VIRTUALENVNAME
popd
fi
source ~/python/$VIRTUALENVNAME/bin/activate
export PYTHONPATH=contrib:~/python/$VIRTUALENVNAME/lib/python2.7/site-packages:/usr/local/lib/python2.7/site-packages/
if [ -e requirements.txt ]
then
pip install -r requirements.txt
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.