[Numpy-discussion] building numpy 1.6.2 on OSX 10.6 / Python2.7.3

Andrew Nelson andyfaff@gmail....
Tue Aug 7 01:15:39 CDT 2012


Dear list,
I am trying to build numpy 1.6.2 from source but am running up against a
few problems.

Platform: OSX10.6.8
Python: 2.7.3 (compiled using gcc 4.2.1)
gcc: 4.2.1
gfortran: 4.2.1

I try the normal build sequence:
python setup.py build
sudo python setup.py install

However, when I try to import numpy I get:

>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py",
line 137, in <module>
    import add_newdocs
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py",
line 9, in <module>
    from numpy.lib import add_newdoc
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py",
line 4, in <module>
    from type_check import *
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py",
line 8, in <module>
    import numpy.core.numeric as _nx
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py",
line 5, in <module>
    import multiarray
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so,
2): Symbol not found: _npy_ceil
  Referenced from:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so
  Expected in: flat namespace
 in
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so

The numpy source was from the Sourceforge official page.
When I run nm on the multiarray module I get:

%nm /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so
.......<snip a lot of stuff>
         U _npy_ceil
         U _npy_double_to_half
         U _npy_doublebits_to_halfbits
         U _npy_float_to_half
         U _npy_floatbits_to_halfbits
         U _npy_half_isnan
         U _npy_half_iszero
         U _npy_half_le
         U _npy_half_lt_nonan
         U _npy_half_to_double
         U _npy_half_to_float
         U _npy_halfbits_to_doublebits
         U _npy_halfbits_to_floatbits

So it seems that the _npy_ceil symbol is undefined.  I looked at
/build/src.macosx-10.6-intel-2.7/numpy/core/include/numpy/config.h and it
contains:

#define HAVE_CEIL

Am I doing something wrong?

regards,
Andrew


-- 
_____________________________________
Dr. Andrew Nelson


_____________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120807/300a9b42/attachment.html 


More information about the NumPy-Discussion mailing list