Python加载模块时出现undefined symbol: PyUnicodeUCS4_DecodeUTF16

报错例如
[quote]ImportError: /usr/local/lib/python3.1/site-packages/cx_Oracle.so: undefined symbol: PyUnicodeUCS4_DecodeUTF16[/quote]

python默认以UCS2形式编译,但cx_Oracle.so是以UCS4编译的,这就是出错的原因,将这两个的编码修改为一致即可。比如将python编译为UCS4:./configure --with-wide-unicode。

你可能感兴趣的:(Python加载模块时出现undefined symbol: PyUnicodeUCS4_DecodeUTF16)