Skip to content

Instantly share code, notes, and snippets.

@mrshu
Created February 4, 2019 15:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrshu/21e21c6fb21a2ba04926eff80c1310c2 to your computer and use it in GitHub Desktop.
Save mrshu/21e21c6fb21a2ba04926eff80c1310c2 to your computer and use it in GitHub Desktop.
Python list available packages
import pkg_resources
installed_packages = pkg_resources.working_set
for package in sorted(installed_packages, lambda x: x.key):
print "{}=={}".format(package.key, package.version)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment