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

Michael Abshoff mabshoff at googlemail.com
Fri Jun 6 14:08:34 EDT 2008


Dan Yamins wrote:

Hi Dan,
> >./configure --disable-toolbox-glue 
> --prefix=/Users/mabshoff/64bitnumpy/python-2.5.2-bin --with-gcc="gcc 
> -m64"
>
>
>     Let's build numpy 1.1.0:
>
>     bsd:64bitnumpy mabshoff$ tar xf numpy-1.1.0.tar.gz
>     bsd:64bitnumpy mabshoff$ cd numpy-1.1.0
>     bsd:numpy-1.1.0 mabshoff$ python setup.py install
>     <SNIP>
>
>
>  
> Michael thanks for your help on building 64-bit python/numpy.     I 
> followed your instructions, and was able to build the python portion.  
> (I did the test "python -c 'import platform;print 
> platform.architecture()' "  suggested by Jon and I got the 64-bit 
> result, so I think it worked properly.)    Thanks very much for 
> this!   However, I was unable to get the numpy build to work.   When 
> running the setup.py install, I get all sorts of permission errors, so 
> I'm forced to run it as su.  (Is this a bad idea?)     Anyhow, when I 
> do run "sudo python setup.py install" in the numpy-1.1.0 directory I 
> downloaded from SciPy website, the build apparently works.
If you were able to install python without sudo you should not need to 
use sudo to build numpy. I certainly did not need to do so. Can you post 
the exact sequence of commands you ran?

>   But when I go into python, I'm not able to import numpy.  
> Specifically, I get:
>
>    daniel-yaminss-mac-pro:Desktop danielyamins$ python
>    Python 2.5.2 (r252:60911, Jun  5 2008, 19:13:50)
>    [GCC 4.0.1 (Apple Inc. build 5465)] on darwin  
>    Type "help", "copyright", "credits" or "license" for more information.
>    >>> import numpy
>   Traceback (most recent call last):
>      File "<stdin>", line 1, in <module>
>      File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", 
> line 93, in <module>
>        import add_newdocs
>      File 
> "/usr/local/lib/python2.5/site-packages/numpy/add_newdocs.py", line 9, 
> in <module>
>        from lib import add_newdoc
>      File 
> "/usr/local/lib/python2.5/site-packages/numpy/lib/__init__.py", line 
> 4, in <module>
>        from type_check import *
>      File 
> "/usr/local/lib/python2.5/site-packages/numpy/lib/type_check.py", line 
> 8, in <module>
>        import numpy.core.numeric as _nx
>      File 
> "/usr/local/lib/python2.5/site-packages/numpy/core/__init__.py", line 
> 5, in <module>
>        import multiarray
>   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
>
>
> Does anyone know what this error means, and/or how to fix it?   Sorry 
> if it's obvious and I should know it alread.y
It is not obvious to me, but I do't see what is wrong either. Apple's 
python is not in /usr/local, so it does not sound like when you build 
numpy you ended up using the "wrong" python.

>
>
> Thanks!
> Dan
>
>
Cheers,

Michael
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>   




More information about the NumPy-Discussion mailing list