python - 试图导入模块 : undefined symbol: PyUnicodeUCS4_DecodeUTF8

标签 python linux glib

导入 glib 失败:

ImportError:/usr/lib/python2.7/dist-packages/glib/_glib.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8

我该如何解决这个问题?

Python 版本为 Python 2.7.3rc2。操作系统是 Debian。

最佳答案

该模块是针对使用 UCS-4 作为其内部 unicode 表示形式构建的 Python 构建的。您的 Python 是使用 UCS-2 作为其内部表示构建的。重建模块,或重建 Python。

the official FAQ 中提到了这个问题.这是深入讨论的in python issue 8654 .

关于python - 试图导入模块 : undefined symbol: PyUnicodeUCS4_DecodeUTF8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16871799/

相关文章:

python - sqlite - 一次插入多个值

Linux:列出文件名,如果上次修改在日期间隔之间

php - 函数在 linux 服务器上给出错误

logging - 为什么 GLib 在递归日志下中止?

c - 如何创建具有公共(public)和私有(private)成员的 GObject 最终类?

Python 正则表达式无法找到模式 - 在 Apache Spark 上使用 pyspark

python - 我认为这是我的 css 文件中的 python 语法?

regex - bash 正则表达式 : replace string with any number of characters

c++ - 如何在 Windows 中使用 glib/gtkmm 打开/生成文件

python - 为什么我的 json 结果包含两个同名的部分?