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

Pierre GM pgmdevlist at gmail.com
Tue Aug 7 08:00:58 EDT 2012


I'm afraid you did.

It's generally considered a "very bad idea"(™) to install NumPy on a recent
OSX system without specifying a destination. By default, the process will
try to install on /Library/Frameworks/Python, overwriting the pre-installed
version of NumPy that comes with your machine. You probably don't want to
do that.

However, using either the --user flag or a virtual environment (
http://www.virtualenv.org/ <http://www.virtualenv.org/en/latest/>) works
pretty well. EG

`python setup.py install --user` should install bumpy in a ~/.local
directory, you'll just have to update your PYTHONPATH

Good luck


Pierre GM

On Tuesday, August 7, 2012 at 08:15 , Andrew Nelson wrote:

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>

line 137, in <module>

    import add_newdocs

line 9, in <module>

    from numpy.lib import add_newdoc

line 4, in <module>

    from type_check import *

line 8, in <module>

    import numpy.core.numeric as _nx

line 5, in <module>

    import multiarray

2): Symbol not found: _npy_ceil

  Referenced from:

  Expected in: flat namespace


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

#define HAVE_CEIL

Am I doing something wrong?



Dr. Andrew Nelson



NumPy-Discussion mailing list

NumPy-Discussion at scipy.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120807/24322fc4/attachment.html>

More information about the NumPy-Discussion mailing list