By using this site, you acknowledge that you have read and understand our Cookie policy, Privacy policy and Terms .
close

Code snippets for various programming languages/frameworks.

rss_feed Subscribe RSS
access_time 6 months ago comment 0 languageEnglish

Different programming languages have different package management tools.

For Python, pip is the package installer. pip package itself can also be used to list all the installed packages in the system. However that doesn't work anymore in the latest versions. You can use pkg_resources package to get the same information. You can also use help function to list all the installed modules.

help('modules')

Code snippet

import pkg_resources
for d in pkg_resources.working_set:
    print(d.project_name, d.version)
info Last modified by Raymond at 6 months ago
info About author

info License/Terms

Please log in or register to comment. account_circle Log in person_add Register
comment Comments (0)
No comments yet.