[SciPy-user] Installing numpy

David Arnold dwarnold45 at suddenlink.net
Sun Nov 18 01:02:39 EST 2007


Wow. Good catch. Switching directories:

Ran 692 tests in 1.211s

 >>>import numpy
 >>>numpy.test()

...

OK
<unittest._TextTestResult run=692 errors=0 failures=0>
 >>>


Not so lucky with scipy:

darnold $ 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
s>>> scipy.test(level=1)

....

Ran 1716 tests in 6.949s

FAILED (failures=2)
<unittest._TextTestResult run=1716 errors=0 failures=2>
 >>>


Along the way, I got:

****************************************************************
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.
****************************************************************

And:

Warning: FAILURE importing tests for <module 'scipy.linsolve.umfpack'  
from '.../linsolve/umfpack/__init__.pyc'>
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- 
packages/scipy/linsolve/umfpack/tests/test_umfpack.py:17:  
AttributeError: 'module' object has no attribute 'umfpack' (in <module>)
Warning: FAILURE importing tests for <module  
'scipy.linsolve.umfpack.umfpack' from '...y/linsolve/umfpack/ 
umfpack.pyc'>

And:

****************************************************************
WARNING: cblas 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 fblas instead of cblas.
****************************************************************


And failures:

======================================================================
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 232, 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 217, 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 158, in  
assert_almost_equal
     assert round(abs(desired - actual),decimal) == 0, msg
AssertionError:
Items are not equal:
  ACTUAL: (-1.9988369941711426+4.5782649454569436e-37j)
  DESIRED: (-9+2j)


I am too much of a neophyte to know what to do at this point.

Any help will be appreciated.

D.

On Nov 17, 2007, at 9:41 PM, Robert Kern wrote:

> David Arnold wrote:
>> All,
>>
>> Mac OS X 10.4.11 PPC.
>>
>> Installed python from this:
>>
>> http://www.python.org/ftp/python/2.5.1/python-2.5.1-macosx.dmg
>>
>> Installation finishes with "There were errors installing the
>> software. Please try installing again." Installing again makes no
>> difference, but Python appears to be running:
>>
>> darnold $ 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.
>>>>>
>>
>> Downloaded numpy from:  http://downloads.sourceforge.net/numpy/
>> numpy-1.0.4.tar.gz?use_mirror=internap
>>
>> After unpacking and changing directories, simply did this:
>>
>> numpy-1.0.4 $ python setup.py install
>>
>> Seem to finish OK. But testing according to README.txt resulted in:
>>
>> numpy-1.0.4 $ python -c 'import numpy; numpy.test()'
>> Running from numpy source directory.
>> Traceback (most recent call last):
>>    File "<string>", line 1, in <module>
>> AttributeError: 'module' object has no attribute 'test'
>>
>> Any ideas or advice?
>
> Change to another directory. The numpy/ directory in the source  
> tree is getting
> picked up instead of the installed one. Same thing with scipy.
>
> -- 
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a  
> harmless enigma
>  that is made terrible by our own mad attempt to interpret it as  
> though it had
>  an underlying truth."
>   -- Umberto Eco
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list