[Scipy-tickets] [SciPy] #481: "import scipy" yields "Fatal Python error:" on OS X 10.4.10, PPC Dual G5

SciPy scipy-tickets@scipy....
Mon Aug 20 12:46:50 CDT 2007


#481: "import scipy" yields "Fatal Python error:" on OS X 10.4.10, PPC Dual G5
--------------------------------+-------------------------------------------
 Reporter:  kwmsmith@gmail.com  |        Owner:  somebody
     Type:  defect              |       Status:  new     
 Priority:  normal              |    Milestone:  0.6     
Component:  Other               |      Version:          
 Severity:  normal              |   Resolution:          
 Keywords:                      |  
--------------------------------+-------------------------------------------
Changes (by kwmsmith@gmail.com):

 * cc: david@ar.media.kyoto-u.ac.jp (removed)

Comment:

 Working over the weekend, I seem to have located the source of error.  To
 make a long story short, scipy builds don't seem to play nicely with fink
 or MacPorts, although I wasn't aware at first that the scipy build process
 looks for fink and macPorts compiled libraries in /sw/lib (fink) and
 /opt/local/lib (macPorts).  I assumed that these libs would be excluded in
 the build process, wrongly.

 Looking at the build-log, the default installation searches for certain
 libraries in /opt/local/lib, the location for MacPorts installed
 libraries, and /sw/lib, the location for fink installed libraries.  If
 these libraries were built with gcc3.x instead of the gcc4.x used for the
 scipy build, (which is likely since the fink and MacPorts builds were a
 long time ago) then the linked-against libraries won't play well with the
 compiled stuff.  This is only a guess and it might be due to something
 else.

 By renaming the searched-for libraries in /opt/lib and /sw/lib, it forces
 the configuration to use the non-fink and non-MacPorts versions of these
 libs, and the resulting build imports and tests fine (but for the 3
 failures already reported:
 {{{
 ksmith:ksmith [177]> 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
 >>> scipy.test()

 [snip]

 ======================================================================
 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.9986538887023926+4.6210330230036456e-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.9986538887023926+4.4402318899426004e-37j)
  DESIRED: (-9+2j)

 ----------------------------------------------------------------------
 Ran 1655 tests in 6.474s

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

 Have people seen this problem before, namely incompatibilty between fink,
 MacPorts and scipy-from-source?  If so, it doesn't seem to be documented,
 AFAIK.

-- 
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/481#comment:2>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list