movq

Wherein I Move a Lot of Words Around

Updating Python Packages

Oh pip. Every time I think you can't do it, I realize I haven't updated lately.

Update pip with pip install -U pip and then you can do this:

$ pip list --outdated
cffi (Current: 0.8.2 Latest: 0.8.6)
Glances (Current: 2.0.1 Latest: 2.1.2)
Jinja2 (Current: 2.7.2 Latest: 2.7.3)
jira-cli (Current: 0.4.2 Latest: 2.0.1)
…

Note the output has the package all by itself at the start of the line. The Unix geek in me salivated at that because it lends itself nicely to:

$ pip list --outdated | awk '{print $1}' | xargs pip install -U

And now you're (blindly) upgraded. I'd only use this autoupgrade for system packages, not for project packages, by the way. For those, though, the list --outdated form is still very useful while the virtualenv is active.