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

Samuel M. Smith smithsm@samuelsmith....
Fri Aug 17 14:14:50 CDT 2007


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)

I had 3 failures

...

****************************************************************
WARNING: clapack module is empty
-----------
See scipy/INSTALL.txt for troubleshooting.
Notes:
* If atlas library is not found by numpy/distutils/system_info.py,
   then scipy uses flapack instead of clapack.
****************************************************************
.....

======================================================================
FAIL: check loadmat case sparse
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/scipy/io/tests/test_mio.py", line 85, in cc
     self._check_case(name, files, expected)
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/scipy/io/tests/test_mio.py", line 80, in  
_check_case
     self._check_level(k_label, expected, matdict[k])
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/scipy/io/tests/test_mio.py", line 63, in  
_check_level
     decimal = 5)
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/numpy/testing/utils.py", line 230, in  
assert_array_almost_equal
     header='Arrays are not almost equal')
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/numpy/testing/utils.py", line 215, in  
assert_array_compare
     assert cond, msg
AssertionError:
Arrays are not almost equal
test sparse; file /Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/site-packages/scipy/io/tests/./data/ 
testsparse_6.5.1_GLNX86.mat, variable testsparse
(mismatch 46.6666666667%)
x: array([[  3.03865194e-319,   3.16202013e-322,   1.04346664e-320,
           2.05531309e-320,   2.56123631e-320],
        [  3.16202013e-322,   0.00000000e+000,   0.00000000e+000,...
y: array([[ 1.,  2.,  3.,  4.,  5.],
        [ 2.,  0.,  0.,  0.,  0.],
        [ 3.,  0.,  0.,  0.,  0.]])

======================================================================
FAIL: check_dot (scipy.lib.tests.test_blas.test_fblas1_simple)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/scipy/lib/blas/tests/test_blas.py", line 76,  
in check_dot
     assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j)
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/numpy/testing/utils.py", line 156, in  
assert_almost_equal
     assert round(abs(desired - actual),decimal) == 0, msg
AssertionError:
Items are not equal:
ACTUAL: (-1.998772144317627+5.1307056773842221e-37j)
DESIRED: (-9+2j)

======================================================================
FAIL: check_dot (scipy.linalg.tests.test_blas.test_fblas1_simple)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/scipy/linalg/tests/test_blas.py", line 75, in  
check_dot
     assert_almost_equal(f([3j,-4,3-4j],[2,3,1]),-9+2j)
   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/site-packages/numpy/testing/utils.py", line 156, in  
assert_almost_equal
     assert round(abs(desired - actual),decimal) == 0, msg
AssertionError:
Items are not equal:
ACTUAL: (-1.998772144317627+5.1063549216060798e-37j)
DESIRED: (-9+2j)

----------------------------------------------------------------------
Ran 1706 tests in 15.697s

FAILED (failures=3)
<unittest.TextTestRunner object at 0x3ad5b90>





More information about the SciPy-user mailing list