Where are the python modules stored?

后端 未结 7 1917
说谎
说谎 2020-12-02 11:08

I have recently started learning Python and I have 2 questions relating to modules.

  1. Is there a way to obtain a list of Python modules available (i.e. installed
相关标签:
7条回答
  • 2020-12-02 11:50

    1) Is there a way to obtain a list of Python modules available (i.e. installed) on a mchine?

    This works for me:

    help('modules')
    

    .

    2) Where is the module code actually stored on my machine?

    Usually in /lib/site-packages in your Python folder. (At least, on Windows.)

    You can use sys.path to find out what directories are searched for modules.

    0 讨论(0)
提交回复
热议问题