[SciPy-User] Building Scipy for Mac OS X 10.6

Scott Stephens stephens.js@gmail....
Wed Jun 2 22:00:15 CDT 2010


I'm attempting to build/install scipy from source on Mac OS X 10.6 (on
intel hardware) and am getting failures on imports.  I've compiled
python 2.6.4 as a framework; I've built both it and numpy as
x86_64-only applications, and am trying to build scipy the same way
(in other words, I'm not trying to do a multi-architecture universal
build).  I ran the numpy test suite and got one known fail and one
skipped test.

I built scipy like this:
FFLAGS="-arch x86_64 -fPIC" LDFLAGS="-Wall -arch x86_64 -undefined
dynamic_lookup" python setup.py build
python setup.py install

I also tried the build without overriding the compile and link flags,
but that leads to producing libraries that are universal 32-bit
ppc/x86, rather than the desired 64 bit x86_64.

When I do import scipy.fftpack, I get:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/__init__.py",
line 10, in <module>
    from basic import *
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/basic.py",
line 13, in <module>
    import _fftpack as fftpack
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so,
2): no suitable image found.  Did find:
	/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so:
can't map

Running scipy.test() generates 19 test failures, most of which are
similar to the above.  The obvious checks for architecture and
dependencies doesn't show anything wrong:

-----
file /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so:
Mach-O 64-bit executable x86_64
-----
otool -L /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/fftpack/_fftpack.so:
	/usr/local/lib/libgfortran.2.dylib (compatibility version 3.0.0,
current version 3.0.0)
	/usr/local/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 125.0.1)
-----

General system info:
os.name: 'posix'
sys.platform: 'darwin'
sys.version: '2.6.4 (r264:75706, Mar 27 2010, 11:45:57) \n[GCC 4.2.1
(Apple Inc. build 5646) (dot 1)]'
numpy.version.version: '1.3.0'
gcc --version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5659)
gfortran --version: GNU Fortran (GCC) 4.2.3
uname -a: Darwin indy.local 10.3.0 Darwin Kernel Version 10.3.0: Fri
Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386

Any ideas?  I'm pretty stumped.

Thanks,

Scott


More information about the SciPy-User mailing list