Created
January 20, 2012 01:34
-
-
Save jldupont/1644406 to your computer and use it in GitHub Desktop.
Python: list of installed packages through easy_install / distutils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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