[SciPy-user] BLAS, LAPACK, ATLAS libraries.

fie.pye at atlas.cz fie.pye at atlas.cz
Mon Jul 2 18:37:00 EDT 2007


Hello.

I would like to install NumPy and SciPy modules. I compiled and install BLAS, LAPACK and ATLAS libraries. After installation and importing NumPy I obtained message:

>>> import numpy
Traceback (most recent call last):
File "", line 1, in 
File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/__init__.py", line 43, in 
import linalg
File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 4, in 
from linalg import *
File "/usr/local/python/python2.5.1/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 25, in 
from numpy.linalg import lapack_lite
ImportError: liblapack.so: cannot open shared object file: No such file or directory
It seams to me that BLAS and LAPACK installation is OK.

PC: 2x Dual-core Opteron 275
OS: CentOS 5.0, kernel 2.6.18-8.1.6.el5
compiler: gcc version 4.2.0, gfortran
python2.5.1
numpy-1.0.3-2
scipy-0.5.2


#BLAS installation Make.inc file:
SHELL = /bin/sh
PLAT = _LINUX
FORTRAN = gfortran
OPTS = -O3 -fPIC
DRVOPTS = $(OPTS)
NOOPT = -fPIC
LOADER = gfortran
LOADOPTS =
ARCH = ar
ARCHFLAGS= cr
RANLIB = ranlib
BLASLIB = blas$(PLAT).a

# Shared libraries
gfortran -shared -Wl,-soname,libblas.so -o libblas.so *.o


# LAPACK installation Make.inc
PLAT = _LINUX
FORTRAN = gfortran
OPTS = -funroll-all-loops -O3 -fpic
DRVOPTS = $(OPTS)
NOOPT =
LOADER = gfortran
LOADOPTS =
TIMER = INT_CPU_TIME
ARCH = ar
ARCHFLAGS= cr
RANLIB = ranlib
BLASLIB = /usr/local/lib64/blas/libblas.a
LAPACKLIB = lapack$(PLAT).a
TMGLIB = tmglib$(PLAT).a
EIGSRCLIB = eigsrc$(PLAT).a
LINSRCLIB = linsrc$(PLAT).a

# Shared libraries
gfortran -shared -Wl,-soname,liblapack.so -o liblapack.so *.o


# NumPy installation
# After ATLAS installation I put all libraries in
# /usr/local/lib64/atlas/
BLAS=/usr/local/lib64/atlas/libfblas.a
LAPACK=/usr/local/lib64/atlas/libflapack.a
ATLAS=/usr/local/lib64/atlas/libatlas.a
LD_LIBRARY_PATH=/usr/lib/:/usr/local/lib/:/usr/lib64/:/usr/local/lib64/:/usr/local/lib64/atlas/
export BLAS LAPACK ATLAS LD_LIBRARY_PATH
python2.5.1 setup.py build
python2.5.1 setup.py install


Thank you for help.
Fie Pye 


More information about the SciPy-User mailing list