[SciPy-user] Installing Scipy on OS X 10.4 - wrong architecture files

Robert Kern robert.kern at gmail.com
Wed Feb 13 14:41:32 EST 2008


Jeffrey Fogel wrote:
> I have been trying to install scipy 0.6.0 from the source code onto my
> Mac (10.4.11, Intel chip) and I'm having some trouble that I hope
> someone here can help me with.  I try installing using:
> 
> python setup.py build
> sudo python setup.py install
> 
> Which seems to compile and install scipy (with a number of warnings,
> but no errors).  However, when I run scipy.test(1,10) it crashes with
> the following error:
> 
> ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/special/_cephes.so,
> 2): no suitable image found.  Did find:
>         /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/scipy/special/_cephes.so:
> mach-o, but wrong architecture
> 
> Looking in the directory mentioned above, a large number of the .so
> files seem to be compiled for ppc instead of i386.  I have been unable
> to find a switch for setup.py that sets the architecture.  Is there a
> way to force the proper architecture so that I can get it to install
> properly?
> 
> I am running python 2.5, also installed from the source from
> python.org. 

Are you sure this was built correctly? The binary on python.org should be 
configured to make Universal extension modules correctly.

> The compilers I'm using are gcc 4.0.1 and gfortran 4.1.0.

Where did gfortran come from? Is it configured correctly to make Universal binaries?

If necessary, do this:

   $ python setup.py config_fc --arch="-arch i386 -arch ppc" --fcompiler=gnu95 build

-- 
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