[Numpy-discussion] install, numpy

Chris Barker Chris.Barker at noaa.gov
Tue Jan 4 09:30:30 CST 2005

René Bastian wrote:
> I tried "python setup.py install" (Python2.4) in order to get Numeric-23.6

> /usr/i486-suse-linux/bin/ld: cannot find -llapack

AARRGG!! I can't believe this bug is still there! Who is responsible for 
maintaining the setup.py for Numeric? This has been discussed numerous 
times on this list, does there need to be a bug report officially filed 

Anyway, the problem is that it's looking for lapack libs that you don't 
have. By default, setup.py is supposed to be configured to use only the 
built-in lapack-lite, so it should build anywhere.

I've looked in the setup.py, and found that it's closer, but apparently 
not fixed. I've got lapack on my system, so it's hard for me to test, 
but try making these changes in setup.py:

# delete all but the first one in this list if using your own LAPACK/BLAS

#This looks to be right:

sourcelist = [os.path.join('Src', 'lapack_litemodule.c'),
#              os.path.join('Src', 'blas_lite.c'),
#              os.path.join('Src', 'f2c_lite.c'),
#              os.path.join('Src', 'zlapack_lite.c'),
#              os.path.join('Src', 'dlapack_lite.c')
# set these to use your own BLAS;

#library_dirs_list = ['/usr/lib/atlas']
library_dirs_list = []
#libraries_list = ['lapack', 'cblas', 'f77blas', 'atlas', 'g2c']
                    # if you also set `use_dotblas` (see below), you'll 
                    # ['lapack', 'cblas', 'f77blas', 'atlas', 'g2c']

libraries_list = []

# set to true (1), if you also want BLAS optimized 
#use_dotblas = 1
use_dotblas = 0
#include_dirs = ['/usr/include/atlas']  # You may need to set this to
include_dirs = []
find cblas.h
                    #  e.g. on UNIX using ATLAS this should be 

Note that some of those may be harmless, even if they don't exist, but 
it won't hurt to get rid of paths you don't have anyway.

Also, if you are doing any linear algebra, you'll get much better 
performance with a native lapack, such as the atlas one, so you may want 
to get that installed, rather than making this fix. search this list for 
lapack and/or atlas, to learn how.

Suse is likely to provide an atlas rpm.


Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Numpy-discussion mailing list