DEV Community

Aasik Muththalif
Aasik Muththalif

Posted on

To get the list of installed packages on python

One of the ways to get the list of the installed packages on python is using command prompt. Here I will show you the step.

  1. Open command prompt
  2. Type python and Enter
  3. It will show like the below image if you installed Python Installed
  4. After Type ** help("modules") and It will show the list of all installed modules on python.

Top comments (2)

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.