Skip to content

Instantly share code, notes, and snippets.

@mdecourse
Created September 27, 2019 00:11
Show Gist options
  • Select an option

  • Save mdecourse/a5607d088145331a22d146614484f72a to your computer and use it in GitHub Desktop.

Select an option

Save mdecourse/a5607d088145331a22d146614484f72a to your computer and use it in GitHub Desktop.
upgrade all python installed modules
import pkg_resources
from subprocess import call
packages = [dist.project_name for dist in pkg_resources.working_set]
print(packages)
print()
call("python -m 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