[SciPy-user] building scipy from source on Mac Os X 10.4 ppc

Kurt Smith kwmsmith at gmail.com
Fri Aug 17 16:34:54 EDT 2007


On 8/17/07, Samuel M. Smith <smithsm at samuelsmith.org> wrote:
> Zach, Robert
>
> Changing to the other fortran compiler did the trick. Yeah! Thank you!
> Still have to explicitly set the MACOSX_DEPLOYMENT_TARGET to 10.4 or
> else it builds by default for 10.3
>
> I don't know who the maintainer of the scipy web page for os x
> installation is but I suggest it be updated
> to use a fortran compiler that works.  Also the link for the g77
> compiler is broken it points to the g95
> compiler both on the hpc site.
>
> ***************
> In case anyone is interested here is what I did to install scipy from
> source on a G4 powerbook
> os x 10.4.10
> xcode 2.4.1     xcode_2.4.1_8m1910_6936315.dmg
> gcc 4.01
>
> Python and numpy from http://www.pythonmac.org/packages/py25-fat/
> index.html
> python-2.5.1-macosx.dmg
> wxPython2.8-osx-unicode-2.8.3.0-universal10.4-py2.5.dmg
> pytz-2006g-py2.5-macosx10.4.dmg
> numpy-1.0.3-py2.5-macosx10.4.mpkg
>
> $ echo $PATH
> /usr/local/bin:/usr/local/sbin:/usr/texbin:/Library/Frameworks/
> Python.framework/Versions/Current/bin:/opt/local/bin:/opt/local/sbin:/
> bin:/sbin:/usr/bin:/usr/sbin:/Users/samuel/bin
>
>
> *** check gcc version
> $ gcc_select
> Current default compiler:
> gcc version 4.0.1 (Apple Computer, Inc. build 5367)
>
> to change if not 4.0x
> $ sudo gcc_select 4.0
>
> *** Install subversion 1.4.4-2  from pkg installer to get scipy from svn
> http://www.open.collab.net/servlets/OCNDownload?id=CSVNMACC
> Subversion 1.4.4-2 Universal.dmg
>
> **** Install gfortran
> get gfortran from below instead of links on scipy page
> http://r.research.att.com/tools/
> http://r.research.att.com/gfortran-4.2.1.dmg
>
> *** Install fftw
> get fftw
> http://fftw.org/fftw-3.1.2.tar.gz
> $ tar -xvzf fftw-3.1.2.tar.gz
> $ cd fftw-3.1.2
> $ ./configure
> $ make
> $ sudo make install
> $ sudo  ln -s /usr/local/lib/libfftw3.a /usr/local/lib/libfftw.a
> $ sudo  ln -s /usr/local/lib/libfftw3.la /usr/local/lib/libfftw.la
> $ sudo  ln -s /usr/local/include/fftw3.h /usr/local/include/fftw.h
>
> *** Build and Install scipy from svn
> $ cd /Volumes/Archive/Install/Python/MacPython/Python2.5.x/scipy/
> $ svn co http://svn.scipy.org/svn/scipy/trunk scipysvn
> Checked out revision 3245.
>
> $ cd scipysvn
>
> ***must set environment variable or will build for 10.3 not 10.4
> $ export MACOSX_DEPLOYMENT_TARGET=10.4
>
> $ python setup.py build_src build_clib --fcompiler=gnu95 build_ext --
> fcompiler=gnu95 build
> $sudo python setup.py install
>
> *** to test
> $ python
>
>  >>> import scipy
>  >>> scipy.test(1,10)


Thanks for the post -- unfortunately I still cannot get things to
compile on my PPC G5 OS X 10.4.10.

I followed your directions to a "T"; result when I loaded scipy:

ksmith:ksmith [381]> python
Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
ksmith:ksmith [382]>

Version info:

Python 2.5.1
gcc 4.0.1
scipy from svn
numpy 1.0.4 from svn
gfortran 4.2.1

Any advice, pointers?  I've been stuck without a working scipy for weeks.

Thanks,

Kurt



More information about the SciPy-User mailing list