umath import error for Numpy builds on OSX 10.6

hardcoreUFO fonnesbeck at gmail.com
Thu Dec 10 18:09:06 EST 2009


For the past several weeks, I have been unable to build numpy from
source, at least nothing that works. The issue is that symbols appear
to be missing from umath. When numpy is imported, I get the following:

In [1]: import numpy
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
  File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev_20091211-
py2.6-macosx-10.6-universal.egg/numpy/__init__.py", line 132, in
<module>
    import add_newdocs
  File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev_20091211-
py2.6-macosx-10.6-universal.egg/numpy/add_newdocs.py", line 9, in
<module>
    from numpy.lib import add_newdoc
  File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev_20091211-
py2.6-macosx-10.6-universal.egg/numpy/lib/__init__.py", line 4, in
<module>
    from type_check import *
  File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev_20091211-
py2.6-macosx-10.6-universal.egg/numpy/lib/type_check.py", line 8, in
<module>
    import numpy.core.numeric as _nx
  File "/Library/Python/2.6/site-packages/numpy-1.5.0.dev_20091211-
py2.6-macosx-10.6-universal.egg/numpy/core/__init__.py", line 6, in
<module>
    import umath
ImportError: dlopen(/Library/Python/2.6/site-packages/
numpy-1.5.0.dev_20091211-py2.6-macosx-10.6-universal.egg/numpy/core/
umath.so, 2): Symbol not found: _npy_cexp
  Referenced from: /Library/Python/2.6/site-packages/
numpy-1.5.0.dev_20091211-py2.6-macosx-10.6-universal.egg/numpy/core/
umath.so
  Expected in: flat namespace
 in /Library/Python/2.6/site-packages/numpy-1.5.0.dev_20091211-py2.6-
macosx-10.6-universal.egg/numpy/core/umath.so

I think my build script is good, but here it is just incase:

#!/bin/sh
export MACOSX_DEPLOYMENT_TARGET=10.6
export CFLAGS="-arch x86_64"
#export FFLAGS="-arch i386 -arch x86_64"
export FFLAGS="-arch x86_64"
export LDFLAGS="-Wall -lgfortran -undefined dynamic_lookup -bundle -
arch x86_64"
rm -rf build
python setup.py config -L/Users/fonnesbeck/Code/freetype -L/Users/
fonnesbeck/Code/libpng build
python setupegg.py egg_info --tag-date bdist_egg

I'm at my wits end with this one, so any help at all is most
appreciated.



More information about the Python-list mailing list