skymoney
skymoney

Reputation: 211

ImportError numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_AsASCIIString

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!

Upvotes: 7

Views: 7992

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798814

Rebuild NumPy against a Python built as UCS-4.

Upvotes: 7

Related Questions