Advertisement
J2897

List Python Modules

Oct 9th, 2021 (edited)
1,040
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. import pkg_resources
  2. installed_packages = pkg_resources.working_set
  3. installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
  4.      for i in installed_packages])
  5. print(*installed_packages_list, sep='\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement