ubuntu - python无法显示模块列表

标签 ubuntu python-2.7

我有新安装的 ubuntu 12.04 64 位。我有 python 2.7 并安装了 python 3.3 作为 python3 到目前为止没有问题,但安装是相当新的。当我尝试检查使用 help('modules') 安装的模块时我有一个错误:

Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help('modules')

Please wait a moment while I gather a list of all available modules...

/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  from gtk import _gtk

** (python:20929): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: cannot register existing type `GdkDevice'
  from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk
Segmentation fault (core dumped)

我不知道如何解释这个输出以及我应该做什么。显然,如果有一些问题,我想在操作系统安装后立即修复它,不要等到会丢失工作。任何人都有类似的问题并且知道应该怎么做?

最佳答案

这似乎是较新的 ubuntu 版本上流行的 python 错误。它与具有不同绑定(bind)的模块的混合有关,请参见此处:

http://blog.rabbitvcs.org/archives/312

我也有这个问题,可以在这里找到一些解决方法的建议:

https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/896836

关于ubuntu - python无法显示模块列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13301100/

相关文章:

python-3.x - 为所有用户更改 python 和 python3 的默认版本

javascript - 无法使用 Python scrapy 和 Selenium 从 javascript 网页中选择元素

Python:如何以更简洁的形式编写?

python - 在文本文件中查找一个点并在 Python 中向该文件添加一个换行符?

python - 函数无法识别 args 和 kwargs

ubuntu - Sublime 启动时没有菜单栏

linux - Perf 在 Ubuntu 中无法正常工作

ubuntu - 私钥格式错误

ubuntu - hcitool lescan 不适用于蓝牙版本 5

python - 是否可以生成随机对象变量名称并从 python 方法返回它们?如何?