[SciPy-User] scipy on snow leopard

Robert Kern robert.kern at gmail.com
Tue Sep 1 14:11:16 EDT 2009


On Tue, Sep 1, 2009 at 03:25, Wolfgang
Kerzendorf<wkerzendorf at googlemail.com> wrote:
> Dear Robert,
>
> Here is all the information I can gather:
>
> I tried several gfortrans here is the one that i'm using now:
>
> GNU Fortran (GCC) 4.5.0 20090604 (experimental) [trunk revision 148180]
> Copyright (C) 2009 Free Software Foundation, Inc.
>
> GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
> You may redistribute copies of GNU Fortran
> under the terms of the GNU General Public License.
> For more information about these matters, see the file named COPYING

And where exactly did you get it from? Does it have x86_64 support?

> Here is the full error message:
>
> In [1]: import scipy.interpolate
> ---------------------------------------------------------------------------
> ImportError                               Traceback (most recent call
> last)
>
> /Users/wkerzend/<ipython console> in <module>()
>
> /Library/Python/2.6/site-packages/scipy/interpolate/__init__.py in
> <module>()
>       5 from info import __doc__
>       6
> ----> 7 from interpolate import *
>       8 from fitpack import *
>       9
>
> /Library/Python/2.6/site-packages/scipy/interpolate/interpolate.py in
> <module>()
>      11                   dot, poly1d, asarray, intp
>      12 import numpy as np
> ---> 13 import scipy.special as spec
>      14 import math
>      15
>
> /Library/Python/2.6/site-packages/scipy/special/__init__.py in <module>
> ()
>       6 #from special_version import special_version as __version__
>
>       7
> ----> 8 from basic import *
>       9 import specfun
>      10 import orthogonal
>
> /Library/Python/2.6/site-packages/scipy/special/basic.py in <module>()
>       6
>       7 from numpy import *
> ----> 8 from _cephes import *
>       9 import types
>      10 import specfun
>
> ImportError: dlopen(/Library/Python/2.6/site-packages/scipy/special/
> _cephes.so, 2): no suitable image found.  Did find:
>        /Library/Python/2.6/site-packages/scipy/special/_cephes.so: mach-o,
> but wrong architecture
>
> -------------------------
>
> Another thing that I did is change the gnu.py in Numpy because it was
> suggested, but that didnt work:
> I changed line 261 from ["ppc","i686","x86_64"] to ["x86_64", "i686"]
> ------
> I have the build log in a pastebin @ http://pastebin.com/d67ac1a9e

It looks like we are not passing any architecture flags to gfortran.
The default architecture appears to be i386 for gfortran but is x86_64
for the rest of Python. Your interpreter is starting up in 64-bit mode
and expecting all of its shared libraries to be 64-bit, too, but the
Fortran ones aren't.

Please show us the output of the following the following:

$ gfortran -arch x86_64 -v

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the SciPy-User mailing list