Reputation: 82
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?
Upvotes: 1
Views: 2616
Reputation: 150
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).
Upvotes: 2
Reputation: 11624
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.
Upvotes: 2