[SciPy-User] [SciPy-user] Incomplete SciPy (probably related to LAPACK), help requested.

David Cournapeau cournape at gmail.com
Tue Oct 6 11:52:57 EDT 2009


On Wed, Oct 7, 2009 at 12:41 AM, Daniel Cotton <daniel.cotton at gmail.com> wrote:
>
> I am currently driving myself crazy with a Python 2.5.1 installation problem
> on a remote linux (scientific linux) machine administered by an admin. The
> machine uses gcc 3.4.5 and needs to be kept at this level for other
> software.
>
> Basically I get this error:
>
>>>> from scipy import interpolate
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File
> "/usr/local/lib/python2.5/site-packages/scipy/interpolate/__init__.py",
> line 13, in <module>
>   from rbf import Rbf
>  File "/usr/local/lib/python2.5/site-packages/scipy/interpolate/rbf.py",
> line 47, in <module>
>   from scipy import linalg
>  File "/usr/local/lib/python2.5/site-packages/scipy/linalg/__init__.py",
> line 8, in <module>
>   from basic import *
>  File "/usr/local/lib/python2.5/site-packages/scipy/linalg/basic.py",
> line 24, in <module>
>   from scipy.linalg import calc_lwork
> ImportError: cannot import name calc_lwork
>
> Or this one:
>
>>>> from scipy.interpolate import interp1d
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File
> "/usr/local/lib/python2.5/site-packages/scipy/interpolate/__init__.py",
> line 13, in <module>
>   from rbf import Rbf
>  File "/usr/local/lib/python2.5/site-packages/scipy/interpolate/rbf.py",
> line 47, in <module>
>   from scipy import linalg
>  File "/usr/local/lib/python2.5/site-packages/scipy/linalg/__init__.py",
> line 8, in <module>
>   from basic import *
>  File "/usr/local/lib/python2.5/site-packages/scipy/linalg/basic.py",
> line 389, in <module>
>   import decomp
>  File "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp.py",
> line 23, in <module>
>   from blas import get_blas_funcs
>  File "/usr/local/lib/python2.5/site-packages/scipy/linalg/blas.py",
> line 14, in <module>
>   from scipy.linalg import fblas
> ImportError: /usr/local/lib/python2.5/site-packages/scipy/linalg/fblas.so:
> undefined symbol: _gfortran_compare_string

Your fortran compiler are mismatched - this cannot work. If you use
gcc 3.*, you should use g77 (the fortran compiler in the gcc 3.*
series).

You need to build every single fortran library (blas/lapack here) with
g77,including atlas.

I think you are making things much more complicated than they are:
note that you don't need to bother your admin, you can build and
install blas/lapack/atlas/numpy by yourself. For example you can
install everything in $HOME/local - I do the same at work where I
don't have admin priviledges.

To check whether a given library uses gfortran, simple use ldd on it
to see whether it links against libgfortran. If it does, it is built
with gfortran. If it doesn't, most likely it is built with g77.

cheers,

David



More information about the SciPy-User mailing list