[Numpy-discussion] Building 64-bit numpy on OSX

Dan Yamins dyamins at gmail.com
Sat Jun 7 11:30:16 EDT 2008


.  What I think matters is "no matching architecture in

> > universal wrapper". Hmmm. I wonder if you and Michael have the same
> > versions of OS X?
>
>  > And why is dlopen looking for a universal library? One would hope that
> > distutils would have taken care of that.
>


I think you're right about the "no matching architecture" thing mattering
more than the permissions issue.  However, somewhere I read that using a
"sudo ... install" command could sometimes interfere with distutils.   Is
that plausible?


In any case, my overall situation is still that I cannot properly install
numpy on 64-bit python.   The immediate issue is that after running the
install command;
      sudo python setup.py install
in the numpy install directory, and then firing up a python 64-bit
interpreter, I cannot import numpy.   what happens is that it fails to be
able to import the multiarray.so module:

    >>>  import numpy
    .....

    ImportError:
dlopen(/usr/local/lib/python2.5/site-packages/numpy/core/multiarray.so, 2):
no suitable image found.  Did find:
    /usr/local/lib/python2.5/site-packages/numpy/core/multiarray.so: no
matching architecture in universal wrapper

I do not know what multiarray.so does.  However, I have tried the following
things:

      a) just importing multiarray.so from the 64-bit python interpreter
prompt.  this fails in the same way as the numpy import:

>>> import multiarray
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: dlopen(./multiarray.so, 2): no suitable image found.  Did find:
    ./multiarray.so: no matching architecture in universal wrapper

     b) switching back to the 32-bit python install, and importing the numpy
version originall installed there.  This works fine.
     c) again back on the 32-bit python, importing multiarray.so -- the
version of it both in the 64-bit python file tree and the 32-bit python file
tree (the two versions of multiarray.so appear to be identical).  This also
works fine.

> Maybe Dan did overwrite some older 32 bit Python with the new 64 bit
build?

>
Since I can switch back on forth between the two builds, and the file
structures are all separate, I think this is probably not the problem,

> Out of curiosity, where are the 32/64 bit libraries normally put?

The 32-bit versin was built as a framework so its in:
/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}
The 64-bit version was not, and its in /usr/local/.


> What does
>
> file /usr/local/lib/python2.5/site-packages/numpy/core/multiarray.so
>
> do?
>


This is telling.  I get:

   multiarray.so: Mach-O universal binary with 2 architectures
   multiarray.so (for architecture i386):    Mach-O bundle i386
   multiarray.so (for architecture ppc):    Mach-O bundle ppc

It seems to my like it's possible that somehow, I never ended up building
numpy as 64-bit in the first place.   But I'm basically stumped.


Thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080607/7f32ef91/attachment.html>


More information about the NumPy-Discussion mailing list