How can I get a list of locally installed Python modules?

Tags: python module pip
By : Masi

I would like to get a list of Python modules, which are in my Python installation (UNIX server).

How can you get a list of Python modules installed in your computer?

By : Masi


pip freeze does it all finding packages however one can simply write the following command to list all paths where python packages are.

>>> import site; site.getsitepackages()
['/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']

on windows, Enter this in cmd

c:\python\libs>python -m pip freeze
By : userRaj

Aside from using pip freeze I have been installing yolk in my virtual environments.

This video can help you solving your question :)
By: admin