When I run django project, I came across a strange problem as listed:
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.
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.
Following some instructions, I recompile and rebuild python with ./configure --enable-unicode=ucs2. But that seems didn't work.
So any guys know the reason or solutions? Thanks a lot!
Rebuild NumPy against a Python built as UCS-4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With