Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing lapack for numpy

Running Ubuntu 11.10 + python2.7...built numpy from source and installed it, but when I go to install it, I get

ImportError: /usr/lib/liblapack.so.3gf: undefined symbol: ATL_chemv 

when it tries to import lapack_lite from numpy.linalg. I tried to rebuild lapack from scratch, but it seems to just make

/usr/local/lib/libblas.a /usr/local/lib/liblapack.a /usr/local/lib/libtmglib.a 

and the .so file. Where does the .so.3gf come from, and how do I fix it?

like image 334
Richard Żak Avatar asked Jan 18 '12 21:01

Richard Żak


People also ask

Does NumPy use LAPACK?

NumPy searches for optimized linear algebra libraries such as BLAS and LAPACK. There are specific orders for searching these libraries, as described below and in the site.

What is LAPACK Python?

LAPACK is a library of linear algebra routines that go beyond basic operations. These include routines for various factorizations and eigenvalue and singular value decompositions.


2 Answers

I was having the same problem and removing the package libopenblas-base did the trick:

sudo apt-get remove libopenblas-base 

As already explained by others, several packages provide incompatible versions of liblapack.so.3gf.

like image 80
soramimo Avatar answered Sep 21 '22 17:09

soramimo


According to some bugreports I see around, you may have more than one provider of BLAS/ATLAS/LAPACK installed, like ATLAS and OpenBLAS/GotoBLAS, that conflict with each other. Have a look on this:

$ ls -l /etc/alternatives/*.so.3gf 

and check that all them correspond to the same package (eg. they all point into /usr/lib/atlas-base/)

like image 29
Ricardo Cárdenes Avatar answered Sep 21 '22 17:09

Ricardo Cárdenes