Skip to content

Instantly share code, notes, and snippets.

@joepol
Created October 20, 2019 05:47
Show Gist options
  • Save joepol/f1f2272a555ae7f8299a4a8334a5bca4 to your computer and use it in GitHub Desktop.
Save joepol/f1f2272a555ae7f8299a4a8334a5bca4 to your computer and use it in GitHub Desktop.
Python installed packages
import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
for i in installed_packages])
print(installed_packages_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment