Skip to content

Instantly share code, notes, and snippets.

@paulgribble
Created June 22, 2022 20:37
Show Gist options
  • Save paulgribble/dcd4a1c919408a116fec691d68b333d5 to your computer and use it in GitHub Desktop.
Save paulgribble/dcd4a1c919408a116fec691d68b333d5 to your computer and use it in GitHub Desktop.
upgrade all packages using pip
import pkg_resources
from subprocess import call
packages = [dist.project_name for dist in pkg_resources.working_set]
call("pip install --upgrade " + ' '.join(packages), shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment