[SciPy-user] SciPy finds wrong lapack

J Oishi joishi at amnh.org
Tue Jan 2 09:22:24 CST 2007


I'm attempting to use SciPy 0.5.2 with NumPy 1.0.1 on a Scientific Linux
distribution (which is itself based on Redhat Enterprise, I think). I  
built ATLAS and ensured I have a complete LAPACK installed in
/usr/local/lib/atlas (following the instructions on the ATLAS site).  
and SciPy both build ok, although I had to modify site.cfg for both in
order to get them to find my ATLAS libraries.

However, scipy.test() fails as follows:

ERROR: check_integer (scipy.io.tests.test_array_import.test_read_array)
Traceback (most recent call last):
line 55, in check_integer
     from scipy import stats
   File "/usr/local/lib/python2.4/site-packages/scipy/stats/ 
line 7, in ?
     from stats import *
   File "/usr/local/lib/python2.4/site-packages/scipy/stats/ 
stats.py", line
190, in ?
     import scipy.special as special
   File "/usr/local/lib/python2.4/site-packages/scipy/special/ 
line 10, in ?
     import orthogonal
65, in ?
     from scipy.linalg import eig
   File "/usr/local/lib/python2.4/site-packages/scipy/linalg/ 
line 8, in ?
     from basic import *
   File "/usr/local/lib/python2.4/site-packages/scipy/linalg/basic.py",
line 23, in ?
     from scipy.linalg import calc_lwork
ImportError: cannot import name calc_lwork


When I run ldd on the calc_lwork.so, I get the following:

[joishi at hachiko scipy-0.5.2]$ ldd
         liblapack.so.3 => /usr/lib/liblapack.so.3 (0x0045a000)
         libblas.so.3 => /usr/lib/libblas.so.3 (0x00111000)
         libm.so.6 => /lib/tls/libm.so.6 (0x00293000)
         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00162000)
         libc.so.6 => /lib/tls/libc.so.6 (0x002b6000)
         libg2c.so.0 => /usr/lib/libg2c.so.0 (0x00b65000)
         /lib/ld-linux.so.2 (0x00ae3000)

However, that's not where the ATLAS version of LAPACK is! I do not  
have a
shared version of liblapack in /usr/local/lib/atlas, only a static .a
version. It seems that somewhere scipy is picking up the shared version
from /usr/lib instead of the static version in /usr/local/lib/atlas.

How can I control this behavior? Or am I chasing the wrong problem? Any
advice would be greatly appreciated.



More information about the SciPy-user mailing list