Created
April 21, 2015 00:38
-
-
Save g-i-o-/9e622b9e2a169d8d9419 to your computer and use it in GitHub Desktop.
handy dandy pip sh scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check if you have the required python libraries | |
cat ./requirements.txt | while read i; do q=`echo $i | cut -d = -f 1`; p=`pip freeze | grep $q`; echo "$i -> $p"; done | |
# Install the ones you dont | |
cat ./requirements.txt | while read i; do q=`echo $i | cut -d = -f 1`; p=`pip freeze | grep $q`; if [ "$p" = "" ]; then echo $i; pip install $i; fi; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment