[SciPy-user] tracebacks when running tests

Pearu Peterson pearu at scipy.org
Thu Jun 3 03:42:08 CDT 2004

On Thu, 3 Jun 2004, Elliot Peele wrote:

> When I run the tests I get tracebacks which reference scipy.linalg.eig.
> I wrote a simple test case to test this, but I get the following
> traceback.
> >>> import scipy.linalg
> >>> eig = scipy.linalg.eig
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.2/site-packages/scipy_base/ppimport.py", line
> 303, in __getattr__
>     module = self._ppimport_importer()
>   File "/usr/lib/python2.2/site-packages/scipy_base/ppimport.py", line
> 273, in _ppimport_importer
>     module = __import__(name,None,None,['*'])
>   File "/usr/lib/python2.2/site-packages/scipy/linalg/__init__.py", line
> 8, in ?    from basic import *
>   File "/usr/lib/python2.2/site-packages/scipy/linalg/basic.py", line
> 11, in ?
>     from lapack import get_lapack_funcs
>   File "/usr/lib/python2.2/site-packages/scipy/linalg/lapack.py", line
> 16, in ?
>     import clapack
> ImportError: /usr/lib/python2.2/site-packages/scipy/linalg/clapack.so:
> undefined symbol: clapack_sgesv
> Looking at the ldd output for clapack.so:
> [elliot at rkbuild linalg]$ ldd clapack.so
>         liblapack.so.3 => /usr/lib/liblapack.so.3 (0xb6eb4000)
>         libg2c.so.0 => /usr/lib/libg2c.so.0 (0xb6e96000)
>         libm.so.6 => /lib/tls/libm.so.6 (0xb6e74000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6e6a000)
>         libc.so.6 => /lib/tls/libc.so.6 (0xb6d32000)
>         libblas.so.3 => /usr/lib/libblas.so.3 (0xb6ce2000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> It links against liblapack.so.3 which doesn't include the symbols that
> were added from atlas since they are in liblapack.a. Is there anyway to
> fix this?

On what system you are running on? How did you install liblapack.a and 
ATLAS libraries?

In principle, scipy can be built also against static libraries even 
when there exists a shared library with the same name but different 
contents. Btw, that does not make any sense for me, I would call it a bug 
in the linux distribution. Anyways, see system_info.py and set 
search_static_first=1 there.

A better fix: install atlas libraries to a different directory than 
/usr/lib, preferably by following instructions in


and then use ATLAS environment variable to point to the location of atlas 
libraries. As Fernando already (almost) discovered, you don't need to 
specify ATLAS environment variable when the location of ATLAS libraries
matches one of the following locations:



More information about the SciPy-user mailing list