[Numpy-discussion] Got: "undefined symbol: PyUnicodeUCS2_FromUnicode" error

David Cournapeau david@ar.media.kyoto-u.ac...
Wed Apr 8 02:53:10 CDT 2009


charlie wrote:
> Hi All,
>
> I got the  "undefined symbol: PyUnicodeUCS2_FromUnicode" error when
> importing numpy.
>
> I have my own non-root version of python 2.5.4 final installed with
> --prefix=$HOME/usr.
> PYTHONHOME=$HOME/usr;
> PYTHONPATH="$PYTHONHOME/lib:$PYTHONHOME/lib/python2.5/site-packages/"
> install and import other modules works fine.
> I install numpy-1.3.0rc2 from the svn repository with "python setup.py
> install"
> then import numpy results in following error:
> /Python 2.5 (release25-maint, Jul 23 2008, 17:54:01)
> /
^^^^

As you can see, this is the system -wide python. You built a python
which is binary incompatible with the system python - which is almost
always a bad idea unless you really know what you are doing.

You should use the system wide python, or built a compatible python. On
debian, this is done with the option --enable-unicode=ucs4 (from you
error message, I guess your installed python was configured with
--enable-unicode=ucs2).

cheers,

David


More information about the Numpy-discussion mailing list