[Numpy-discussion] numpy1.04b4: undefined symbol: PyUnicodeUCS2_FromUnicode. error No _WIN32

Travis Oliphant oliphant.travis at ieee.org
Mon Aug 28 14:34:03 CDT 2006


rex wrote:
> Numpy builds, but fails to run with the error message:
>
>   
>> python
>>     
> Python 2.4.2 (#1, Apr 24 2006, 18:13:30)
> [GCC 4.1.0 (SUSE 10.1 Linux)] on linux2
>   
>>>> import numpy
>>>>         
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.4/site-packages/numpy/__init__.py", line 35, in ?
>     import core
>   File "/usr/lib/python2.4/site-packages/numpy/core/__init__.py", line 5, in ?
>     import multiarray
> ImportError: /usr/lib/python2.4/site-packages/numpy/core/multiarray.so: undefined symbol: PyUnicodeUCS2_FromUnicode
>
>
>   

This error usually means that NumPy was built and linked against a 
Python build where unicode strings were 2-bytes per character but you 
are trying to import it on a Python build where unicode strings are 
4-bytes per character.   Perhaps you have changed your build of Python 
and did not remove the build directory of NumPy.

Try

rm -fr build

in the numpy directory (where you run setup.py) and build again.


You can tell how many bytes-per-unicode character your system is built 
with by looking at the output of sys.maxunicode






More information about the Numpy-discussion mailing list