Skip to content

Instantly share code, notes, and snippets.

@beaudierman
Created February 15, 2018 14:14
Show Gist options
  • Save beaudierman/afa467884ff52b145e6dcd8ad3ca941e to your computer and use it in GitHub Desktop.
Save beaudierman/afa467884ff52b145e6dcd8ad3ca941e to your computer and use it in GitHub Desktop.
Update pip packages with a simple Python script, answer from https://stackoverflow.com/a/5839291
import pip
from subprocess import call
packages = [dist.project_name for dist in pip.get_installed_distributions()]
call("pip2 install --upgrade " + ' '.join(packages), shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment