简体   繁体   中英

Enthought: no Python documentation found for 'modules' + version number

I want to be able to list the installed modules and their version number on my Python Enthought distribution. When I open the terminal and type

$ help('modules') 

i get

>> no Python documentation found for 'modules'

if I do the same for my standard python distro on the mac (/usr/bin/python/) it works fine although I am still missing the module version.

Any idea how to properly list all the installed modules and their corresponding version?

To list all modules:

import sys
print sys.modules

for the version information ... that's a bit tricky. Because if this information is not provided by the respective package/module you relay on the underlying packaging mechanism.

if you use pip you could do a pip show or freeze or you could use yolk .

You might be looking for the enpkg command. Running

enpkg -l

from the command line will list all packages installed in EPD with version information.

Here is more info on enpkg: https://support.enthought.com/entries/22415022-using-enpkg-to-update-epd-packages

Update:

Regarding help('modules') itself: It was deliberately disabled in Enthought's Python because it reliably caused segfaults with a standard set of EPD packages (among other reasons).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM