DEV Community

Discussion on: To get the list of installed packages on python

Collapse
 
rhymes profile image
rhymes

Hi Aasik!

If you want it all modules and third party packages as a data structure you can operate on you can also do this:

>>> import sys
>>> set([m.split('.', 1)[0] for m in sys.modules.keys()])

Let me know if that works for you!

Collapse
 
aasik profile image
Aasik Muththalif

Hi,
Thanks and It works for me.