When I run django project, I came across a strange problem as listed:
当我运行django项目时,我遇到了一个奇怪的问题:
ImportError: /usr/local/lib/python2.7/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_AsASCIIString
If I I run this project in dev mode(python manage.py runserver 0.0.0.0:8000), it doesn't occur. But when I deploy this project in apache and then this problem occurs.
如果我以开发模式运行此项目(python manage.py runserver 0.0.0.0:8000),则不会发生。但是当我在apache中部署这个项目时,就会出现这个问题。
In this project, I use nltk package and mongodb, and numpy is a dependency. My OS is CentOS 6.3 and I upgraded python from 2.6.6 to 2.7.3 which is compiled by myself.
在这个项目中,我使用nltk包和mongodb,而numpy是一个依赖项。我的操作系统是CentOS 6.3,我将python从2.6.6升级到2.7.3,这是我自己编译的。
Following some instructions, I recompile and rebuild python with ./configure --enable-unicode=ucs2. But that seems didn't work.
按照一些说明,我使用./configure--enable-unicode = ucs2重新编译和重建python。但这似乎不起作用。
So any guys know the reason or solutions? Thanks a lot!
所以任何人都知道原因或解决方案?非常感谢!
1 个解决方案
#1
7
Rebuild NumPy against a Python built as UCS-4.
针对构建为UCS-4的Python重建NumPy。
#1
7
Rebuild NumPy against a Python built as UCS-4.
针对构建为UCS-4的Python重建NumPy。