Skip to content

Instantly share code, notes, and snippets.

@pgilad
Created October 25, 2015 09:46
Show Gist options
  • Save pgilad/cee64c411fb180f7eb0b to your computer and use it in GitHub Desktop.
Save pgilad/cee64c411fb180f7eb0b to your computer and use it in GitHub Desktop.
pip upgrade all packages
import pip
import subprocess
for dist in pip.get_installed_distributions():
call_str = "pip install --upgrade {0}".format(dist.project_name)
print
print "Upgrading {}".format(dist.project_name)
subprocess.call(call_str, shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment