Skip to content

Instantly share code, notes, and snippets.

@greyli
Created May 13, 2017 03:13
Show Gist options
  • Select an option

  • Save greyli/0d775c8ba0a52a3ea1f879c1c69d37f2 to your computer and use it in GitHub Desktop.

Select an option

Save greyli/0d775c8ba0a52a3ea1f879c1c69d37f2 to your computer and use it in GitHub Desktop.

Revisions

  1. greyli created this gist May 13, 2017.
    6 changes: 6 additions & 0 deletions update.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    # http://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip
    import pip
    from subprocess import call

    for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)