Created
February 4, 2019 15:49
-
-
Save mrshu/21e21c6fb21a2ba04926eff80c1310c2 to your computer and use it in GitHub Desktop.
Python list available packages
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 | |
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