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

Andrew Nelson andyfaff at gmail.com
Wed Aug 8 01:15:45 EDT 2012


Dear Pierre,
as indicated yesterday OSX system python is in:

/System/Library/Frameworks/Python.framework/

I am installing into:

/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages

This should not present a problem and does not explain why numpy does not
build/import correctly on my setup.

regards,
Andrew.



> Date: Tue, 7 Aug 2012 14:00:58 +0200
> From: Pierre GM <pgmdevlist at gmail.com>
> Subject: Re: [Numpy-discussion] building numpy 1.6.2 on OSX 10.6 /
>         Python2.7.3
>


> Andrew,
>
> 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>
>
>   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
>
> _____________________________________
>
> _______________________________________________
>
> NumPy-Discussion mailing list
>
> NumPy-Discussion at scipy.org
>
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120807/24322fc4/attachment.html
>
> ------------------------------
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
> End of NumPy-Discussion Digest, Vol 71, Issue 11
> ************************************************
>



-- 
_____________________________________
Dr. Andrew Nelson


_____________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120808/3ca49528/attachment.html>


More information about the NumPy-Discussion mailing list