python:undefined symbol: PyUnicodeUCS*问题
来源:互联网 发布:帝国cms全站搜索代码 编辑:程序博客网 时间:2024/06/05 12:02
When importing module X, why do I get “undefined symbol: PyUnicodeUCS2*”?
You are using a version of Python that uses a 4-byte representation for Unicode characters, but some C extension module you are importing was compiled using a Python that uses a 2-byte representation for Unicode characters (the default).
If instead the name of the undefined symbol starts with PyUnicodeUCS4, the problem is the reverse: Python was built using 2-byte Unicode characters, and the extension module was compiled using a Python with 4-byte Unicode characters.
This can easily occur when using pre-built extension packages. RedHat Linux 7.x, in particular, provided a “python2” binary that is compiled with 4-byte Unicode. This only causes the link failure if the extension uses PyUnicode_FromUnicode or any other of the PyUnicode functions. It is also a problem if an extension uses any of the Unicode-related format specifiers for Py_BuildValue (or similar) or parameter specifications for PyArg_ParseTuple.
You can check the size of the Unicode character a Python interpreter is using by checking the value of sys.maxunicode:
>>> import sys>>> if sys.maxunicode > 65535:... print 'UCS4 build'... else:... print 'UCS2 build'
The only way to solve this problem is to use extension modules compiled with a Python binary built using the same size for Unicode characters.
- python:undefined symbol: PyUnicodeUCS*问题
- undefined symbol:_zend_list_delete问题
- `menu_proxy_module_load': python: undefined symbol: menu_proxy_module_load
- Python/word.so: undefined symbol: _ZNK4Word7reverseEv
- apache重启时undefined symbol: apr_global_mutex_lockfile的问题
- Undefined symbol
- undefined symbol
- skyeye-1.3.5运行提示python: undefined symbol: PyFloat_Type 和 undefined symbol: PyUnicodeUCS2_FromUnicode
- 关于解决工程编译出现Undefined symbol __use_two_region_memory 和Undefined symbol __initial_sp的问题
- 内嵌Python import时undefined symbol错误及解决
- python 调用C++动态库所遇到的undefined symbol ***
- symbol lookup error - undefined symbol
- symbol lookup error: undefined symbol
- symbol lookup error: undefined symbol
- mwldsym2.exe: Undefined symbol: 'CDesC16ArrayFlat::CDesC16ArrayFlat(int) 构造问题
- 关于"symbol lookup error xxxxx , undefined symbol"问题的解决方式
- Undefined symbol CnvUtfConverter::ConvertToUnicodeFromUtf8()
- dlopen() : undefined symbol
- HTTP协议知识总结
- Json格式对象转换为XML
- Dexposed:Android平台免Root无侵入AOP框架
- 在myeclipse8.5中为项目添加单元测试
- 安卓有哪些很好用的小众APP
- python:undefined symbol: PyUnicodeUCS*问题
- pycharm-profession-3.4.1 Windows版本安装
- 大型网站架构体系的演变
- HTML5 audio标签的使用
- 欢迎使用CSDN-markdown编辑器
- [UnityUI]一些有趣的UI例子
- hdoj 1002 A + B Problem II
- Spring MVC 框架搭建及详解
- Dropzone的使用方法