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

Martin De Kauwe mdekauwe at gmail.com
Mon Jun 21 18:11:31 EDT 2010


Hi,

I had to reinstall all my python libs as my hard disk blew up...and I
would suggest macports is the easiest way to go. But equally I managed
to build scipy from the svn. Follow the advice on this website,
v.good.

http://blog.hyperjeff.net/?p=160

Only thing I would add...for me to get scipy to build I had to do this
python setup.py build --fcompiler=gnu95 instead of python setup.py
build.

Also remember you need to build a new 64bit version of python (2.6.5)
not the one that ships with your mac. You can get a nice dmg file from
here, http://blog.jbhannah.net/p/565, though make sure you follow all
the instructions.

Saying all of this I had issues compiling matplotlib, so as I said at
the outset go with the macports build.

Martin

On Jun 3, 4:00 am, Scott Stephens <stephens... at gmail.com> wrote:
> 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-packa ges/scipy/fftpack/__init__.py",
> line 10, in <module>
>     from basic import *
>   File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packa ges/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-packag es/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-packag es/scipy/fftpack/_fftpack.so
> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packag es/scipy/fftpack/_fftpack.so:
> Mach-O 64-bit executable x86_64
> -----
> otool -L /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packag es/scipy/fftpack/_fftpack.so
> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packag es/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
> _______________________________________________
> SciPy-User mailing list
> SciPy-U... at scipy.orghttp://mail.scipy.org/mailman/listinfo/scipy-user



More information about the SciPy-User mailing list