[SciPy-user] umfpack and building scipy from source

Ryan Krauss ryanlists at gmail.com
Thu Nov 30 13:13:08 CST 2006


I seem to have some basic funtionality, but when I run one of the
recent scripts I was working on I get:

In [5]: run project1.py 0.25 shafagh
---------------------------------------------------------------------------
exceptions.RuntimeError                              Traceback (most recent call
 last)


RuntimeError: module compiled against version 1000002 of C-API but this version
of numpy is 1000009
---------------------------------------------------------------------------
exceptions.ImportError                               Traceback (most recent call
 last)

E:\siue\mechatronics\extra_credit\project1\project1.py
----> 1
      2
      3 from scipy import *
      4 from pylab import plot, figure, cla, show, clf, xlabel, ylabel, legend
      5
      6 from  IPython.Debugger import Pdb
      7

C:\Python24\Lib\site-packages\scipy\io\__init__.py
      6 from info import __doc__
      7
----> 8 from numpyio import packbits, unpackbits, bswap, fread, fwrite, \
      9      convert_objectarray
     10 from mio import *

ImportError: numpy.core.multiarray failed to import
WARNING: Failure executing file: <project1.py>


It seems the list is a bit quite lately.  If there is lots of
development work going on right now and I should just try this again
in a few days/weeks, let me know.  Everything works for me with rc1.
I will revert for now.

Ryan

On 11/30/06, Ryan Krauss <ryanlists at gmail.com> wrote:
> I may have had the misfortune of checking out of svn last night while
> numpy and scipy were out of sync.  I re-did my svn checkout just now
> and numpy didn't change, but scipy went from version 2339 to 2342.  I
> now get fewer errors.  I also did a python setup.py clean for each
> before rebuilding and deleted site-packages/numpy and /scipy before
> rebuilding.  I am still getting an error from scipy.test that it is
> built against a different version of the API (see below).  Is this
> detrimental?
>
> Thanks,
>
> Ryan
>
> >>> scipy.test()
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> Warning: FAILURE importing tests for <module 'scipy.linsolve.umfpack.umfpack' fr
> om '...y\\linsolve\\umfpack\\umfpack.pyc'>
> C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3: ImportError: numpy.c
> ore.multiarray failed to import (in ?)
>   Found 128 tests for scipy.linalg.fblas
>   Found 397 tests for scipy.ndimage
>   Found 53 tests for scipy.linalg.decomp
> RuntimeError: module compiled against version 1000002 of C-API but this version
> of numpy is 1000009
> Warning: FAILURE importing tests for <module 'scipy.sparse.sparse' from '...ckag
> es\\scipy\\sparse\\sparse.pyc'>
> C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4: ImportError: numpy.c
> ore.multiarray failed to import (in ?)
>   Found 20 tests for scipy.fftpack.pseudo_diffs
> Warning: FAILURE importing tests for <module 'scipy.optimize.optimize' from '...
> es\\scipy\\optimize\\optimize.pyc'>
> C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6: AttributeError: 'modu
> le' object has no attribute 'error' (in ?)
>   Found 4 tests for scipy.linalg.lapack
>   Found 18 tests for scipy.fftpack.basic
> Warning: FAILURE importing tests for <module 'scipy.linsolve.umfpack' from '...\
> \linsolve\\umfpack\\__init__.pyc'>
> C:\Python24\Lib\site-packages\scipy\linsolve\umfpack\tests\test_umfpack.py:17: A
> ttributeError: 'module' object has no attribute 'umfpack' (in ?)
>   Found 42 tests for scipy.lib.lapack
>   Found 128 tests for scipy.lib.blas.fblas
>   Found 7 tests for scipy.linalg.matfuncs
>   Found 41 tests for scipy.linalg.basic
>   Found 16 tests for scipy.lib.blas
>   Found 14 tests for scipy.linalg.blas
>   Found 95 tests for scipy.sparse
>   Found 4 tests for scipy.fftpack.helper
>   Found 0 tests for __main__
> ...caxpy:n=4
> ..caxpy:n=3
> ....ccopy:n=4
> ..ccopy:n=3
> .............cscal:n=4
> ....cswap:n=4
> ..cswap:n=3
> .....daxpy:n=4
> ..daxpy:n=3
> ....dcopy:n=4
> ..dcopy:n=3
> .............dscal:n=4
> ....dswap:n=4
> ..dswap:n=3
> .....saxpy:n=4
> ..saxpy:n=3
> ....scopy:n=4
> ..scopy:n=3
> .............sscal:n=4
> ....sswap:n=4
> ..sswap:n=3
> .....zaxpy:n=4
> ..zaxpy:n=3
> ....zcopy:n=4
> ..zcopy:n=3
> .............zscal:n=4
> ....zswap:n=4
> ..zswap:n=3
> ................................................................................
> ................................................................................
> ................................................................................
> ................................................................................
> ................................................................................
> ................................................................................
> ...........................................................caxpy:n=4
> ..caxpy:n=3
> ....ccopy:n=4
> ..ccopy:n=3
> .............cscal:n=4
> ....cswap:n=4
> ..cswap:n=3
> .....daxpy:n=4
> ..daxpy:n=3
> ....dcopy:n=4
> ..dcopy:n=3
> .............dscal:n=4
> ....dswap:n=4
> ..dswap:n=3
> .....saxpy:n=4
> ..saxpy:n=3
> ....scopy:n=4
> ..scopy:n=3
> .............sscal:n=4
> ....sswap:n=4
> ..sswap:n=3
> .....zaxpy:n=4
> ..zaxpy:n=3
> ....zcopy:n=4
> ..zcopy:n=3
> .............zscal:n=4
> ....zswap:n=4
> ..zswap:n=3
> ...Result may be inaccurate, approximate err = 5.69043366261e-009
> ...Result may be inaccurate, approximate err = 1.39218513881e-010
> ................................................................................
> ..Resizing... 16 17 24
> Resizing... 20 7 35
> Resizing... 23 7 47
> Resizing... 24 25 58
> Resizing... 28 7 68
> Resizing... 28 27 73
> .....Use minimum degree ordering on A'+A.
> ........................Use minimum degree ordering on A'+A.
> ...................Resizing... 16 17 24
> Resizing... 20 7 35
> Resizing... 23 7 47
> Resizing... 24 25 58
> Resizing... 28 7 68
> Resizing... 28 27 73
> .....Use minimum degree ordering on A'+A.
> .................Resizing... 16 17 24
> Resizing... 20 7 35
> Resizing... 23 7 47
> Resizing... 24 25 58
> Resizing... 28 7 68
> Resizing... 28 27 73
> .....Use minimum degree ordering on A'+A.
> ................
> ----------------------------------------------------------------------
> Ran 967 tests in 2.422s
>
> OK
> <unittest.TextTestRunner object at 0x00FFBFD0>
> >>>
>
> On 11/30/06, Robert Cimrman <cimrman3 at ntc.zcu.cz> wrote:
> > Ryan Krauss wrote:
> > > I am trying to build scipy/numpy from source on Windows XP.  I do not
> > > have umfpack installed.  When I build scipy I get this warning:
> > >
> > > C:\Python24\lib\site-packages\numpy\distutils\system_info.py:401: UserWarning:
> > >     UMFPACK sparse solver (http://www.cise.ufl.edu/research/sparse/umfpack/)
> > >     not found. Directories to search for the libraries can be specified in the
> > >     numpy/distutils/site.cfg file (section [umfpack]) or by setting
> > >     the UMFPACK environment variable.
> > >   warnings.warn(self.notfounderror.__doc__)
> > >
> > > numpy.test() runs without problems.  The output of scipy.test() is
> > > slightly scary:
> > >
> > > scipy.test()
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > >   Found 397 tests for scipy.ndimage
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > Warning: FAILURE importing tests for <module 'scipy.sparse.sparse'
> > > from '...ckages\\scipy\\sparse\\sparse.pyc'>
> > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:2:
> > > ImportError: numpy.core.multiarray failed to import (in ?)
> > > Warning: FAILURE importing tests for <module 'scipy.optimize.optimize'
> > > from '...es\\scipy\\optimize\\optimize.pyc'>
> > > C:\Python24\Lib\site-packages\scipy\optimize\minpack.py:6:
> > > AttributeError: 'module' object has no attribute 'error' (in ?)
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > Warning: FAILURE importing tests for <module
> > > 'scipy.linsolve.umfpack.umfpack' from
> > > '...y\\linsolve\\umfpack\\umfpack.pyc'>
> > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:3:
> > > ImportError: numpy.core.multiarray failed to import (in ?)
> > > RuntimeError: module compiled against version 1000002 of C-API but
> > > this version of numpy is 1000009
> > > Warning: FAILURE importing tests for <module 'scipy.linsolve.umfpack'
> > > from '...\\linsolve\\umfpack\\__init__.pyc'>
> > > C:\Python24\Lib\site-packages\scipy\linsolve\_superlu.py:4:
> > > ImportError: numpy.core.multiarray failed to import (in ?)
> > >   Found 95 tests for scipy.sparse
> > >   Found 0 tests for __main__
> > > .............................................................................................................................................................................................................................................................................................................................................................................................................EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...E.EE.......EEE..EE.EE.E.EEEEEEEE.EEE.E.E.E
> > > ======================================================================
> > > ERROR: check_eye (scipy.tests.test_sparse.test_construct_utils)
> > > ----------------------------------------------------------------------
> > > Traceback (most recent call last):
> > >   File "C:\Python24\Lib\site-packages\scipy\sparse\tests\test_sparse.py",
> > > line 626, in check_eye
> > >     a = speye(2, 3 )
> > >   File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line
> > > 2833, in speye
> > >     return spdiags(diags, k, n, m)
> > >   File "C:\Python24\Lib\site-packages\scipy\sparse\sparse.py", line
> > > 2811, in spdiags
> > >     diagfunc = eval('sparsetools.'+_transtabl[mtype]+'diatocsc')
> > >   File "<string>", line 0, in ?
> > > AttributeError: 'module' object has no attribute 'ddiatocsc'
> > >
> >  > ....
> > >
> > > What have I done wrong?  I did not try to build Atlas/Blas/Lapack from
> > > source but just down loaded the precomipled versions into
> > > C:\BlasLapackLibs.  My scipy and numpy svn folders are not on my PATH
> > > or my PYTHONPATH.  I had some trouble getting numpy's setup.py to find
> > > the atlas, lapack, blas libs until I set an ATLAS environment
> > > variable.
> >
> > Ryan,
> >
> > it seems you try to run scipy with different version of numpy than it
> > was compiled with. did you try removing existing installation and
> > rebuilding all sources?
> >
> > Anyway missing umfpack would not cause all those errors.
> >
> > > Oh, and the example site.cfg mentions libamd.a as well as umfpack.  Do
> > > I need the amd lib?  I am running an amd processor under windows
> > > (Athlon X2).
> >
> > libamd.a has nothing to do with the amd processors - it it a library (a
> > part of umfpack-related package) for ordering a sparse matrix prior to
> > Cholesky factorization (http://www.cise.ufl.edu/research/sparse/amd/)
> > and you do not need it if you do not use umfpack.
> >
> > r.
> > _______________________________________________
> > 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