694 shaares
4 liens privés
4 liens privés
There isn't a built-in flag yet, but you can use
pip freeze --local | grep -v '^-e' | cut -d = -f 1 | xargs -n1 pip install -U
Note: there are infinite potential variations for this. I'm trying to keep this answer short and simple, but please do suggest variations in the comments!
Relevant edits:
Added a grep to skip "-e" package definitions, as suggested by @jawache (Yes, you could replace grep+cut with sed or awk or perl or...).
Newer versions of pip allow you to list outdated packages:
pip list --outdated --format=freeze
Added -n1 to xargs, prevents stopping everything if updating one package fails (thanks @andsens)
source : https://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip#3452888