Created
October 20, 2016 11:04
-
-
Save stripe-q/c8d3731c9ba786e98a47d1c479f23875 to your computer and use it in GitHub Desktop.
update all pip packages (shell)
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
#!/bin/bash | |
packs=($(pip list | awk '{ print $1 }')) | |
length=${#packs[@]} | |
num=1 | |
for p in "${packs[@]} | |
do | |
echo "[$num / $length]: update package: $p" | |
pip install -U $p | |
num=$(( $num + 1 )) | |
done | |
# also, you can do that in one-liner. | |
for p in "$(pip list | awk '{ print $1 }')"; do pip install -U $p; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment