Created
July 4, 2017 13:02
-
-
Save kirkins/e5679303b3c01e97154eb0ce1f335b88 to your computer and use it in GitHub Desktop.
Bash command to install with pip and save to requirments
This file contains 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
pip_install_save() { | |
package_name=$1 | |
requirements_file=$2 | |
if [[ -z $requirements_file ]] | |
then | |
requirements_file='./requirements.txt' | |
fi | |
sudo pip install $package_name && pip freeze | grep -i $package_name >> $requirements_file | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment