Skip to content

Instantly share code, notes, and snippets.

@jldupont
Created January 20, 2012 01:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jldupont/1644406 to your computer and use it in GitHub Desktop.
Save jldupont/1644406 to your computer and use it in GitHub Desktop.
Python: list of installed packages through easy_install / distutils
import pkg_resources
distros = pkg_resources.AvailableDistributions() # scan sys.path
for key in distros:
for dist in distros[key]:
print dist.name, dist.version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment