Created
February 13, 2018 23:19
-
-
Save keithkim/4856242b3b24dccb6a2c1c2b4bc942ac to your computer and use it in GitHub Desktop.
Update Python package using pip
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
# Windows | |
for /F "delims===" %i in ('pip freeze -l') do pip install -U %i | |
# or, | |
for /F "delims= " %i in ('pip list --outdated') do pip install -U %i | |
# Linux | |
sudo -H pip install pipdate | |
sudo -H pipdate | |
# or, | |
pip list --outdated --format=legacy | awk '{print $1;}' | xargs -n1 pip install -U | |
# or, | |
pip list -o | cut -d " " -f 1 | tail -n +3 | xargs pip install -U | |
# or, | |
pip list --format=legacy --outdated | cut -d' ' -f1 | xargs pip install --upgrade | |
### REFERENCE ### | |
# https://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip | |
# https://github.com/pypa/pip/issues/3819 | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment