Skip to content

Instantly share code, notes, and snippets.

@tadeck
Created October 11, 2012 10:25
Show Gist options
  • Save tadeck/3871492 to your computer and use it in GitHub Desktop.
Save tadeck/3871492 to your computer and use it in GitHub Desktop.
pip upgrade all Python modules
"""
Script for upgrading all modules using pip command-line tool.
Source: http://stackoverflow.com/a/5839291/548696
"""
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment