7

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!

Gabriel
  • 40,504
  • 73
  • 230
  • 404
skymoney
  • 211
  • 3
  • 12

1 Answers1

7

Rebuild NumPy against a Python built as UCS-4.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358