Skip to content

Instantly share code, notes, and snippets.

@alfredocambera
Created March 8, 2019 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredocambera/495756bfd229adcb1af42f1074e12344 to your computer and use it in GitHub Desktop.
Save alfredocambera/495756bfd229adcb1af42f1074e12344 to your computer and use it in GitHub Desktop.
generates a list of installed packages using the same format as the output generated by "pip3 freeze"
#!/usr/bin/env python3
import pkg_resources
dists = [str(d).replace(" ","==") for d in pkg_resources.working_set]
for i in dists:
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment