Check installed packages in Python

visibility 372 access_time 3 years ago languageEnglish timeline Stats
timeline Stats
Page index 0.39

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.


Code snippet

import pkg_resources
for d in pkg_resources.working_set:
    print(d.project_name, d.version)
info Last modified by Raymond 3 years ago copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

More from Kontext
Torchvision error: Could not find module image.pyd
visibility 2,822
thumb_up 3
access_time 5 months ago
Python: Save Pandas DataFrame to Teradata
visibility 8,116
thumb_up 1
access_time 2 years ago
Create and Read Pickle Files in Python
visibility 3,441
thumb_up 0
access_time 2 years ago