[英]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. 我希望能够在我的Python Enthought发行版中列出已安装的模块及其版本号。 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. 如果我在mac(/ usr / bin / python /)上为我的标准python发行版做同样的事情,它工作正常,虽然我仍然缺少模块版本。
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 . 如果你使用pip,你可以做一个pip show或冻结,或者你可以使用蛋黄 。
You might be looking for the enpkg
command. 您可能正在寻找
enpkg
命令。 Running 运行
enpkg -l
from the command line will list all packages installed in EPD with version information. 从命令行将列出安装在EPD中的所有软件包以及版本信息。
Here is more info on enpkg: https://support.enthought.com/entries/22415022-using-enpkg-to-update-epd-packages 以下是有关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). 关于帮助('模块')本身:它在Enthought的Python中被故意禁用,因为它可靠地导致了一组标准EPD包的段错误(以及其他原因)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.