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

前端 未结 30 2580
庸人自扰
庸人自扰 2020-11-22 04:32

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?

30条回答
  •  醉梦人生
    2020-11-22 04:45

    I ran into a custom installed python 2.7 on OS X. It required X11 to list modules installed (both using help and pydoc).

    To be able to list all modules without installing X11 I ran pydoc as http-server, i.e.:

    pydoc -p 12345
    

    Then it's possible to direct Safari to http://localhost:12345/ to see all modules.

提交回复
热议问题