Created
April 28, 2024 00:07
-
-
Save TheNerdMan/d792eb6ef1bc98166dc81eb81c9935b8 to your computer and use it in GitHub Desktop.
Safe pip, for when some pip installs are broken for some reason
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
#!/bin/bash | |
safe_pip() { | |
if [ -f "./requirements.txt" ]; then | |
echo "Safely installing each pip in this dir's requirements.txt"; | |
cat requirements.txt | sed -e '/^\s*#.*$/d' -e '/^\s*$/d' | xargs -n 1 pip install; | |
else | |
echo "no requirements.txt found!" | |
fi | |
} | |
safe_pip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would also be nice to check if youre in an venv but I cba to do that rn its 1am