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?
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:
and check that all them correspond to the same package (eg. they all point into
/usr/lib/atlas-base/
)I was having the same problem and removing the package libopenblas-base did the trick:
As already explained by others, several packages provide incompatible versions of liblapack.so.3gf.
This issue arises when you have libopenblas-base and libatlas3-base installed, but don't have liblapack3 installed. This combination of packages installs conflicting versions of libblas.so (from OpenBLAS) and liblapack.so (from ATLAS).
Solution 1 (my favorite): You can keep both OpenBLAS and ATLAS on your machine if you also install liblapack3.
Solution 2: Uninstall ATLAS (this will actually install liblapack3 for you automatically because of some deb package shenanigans)
Solution 3: Uninstall OpenBLAS
Bad configuration
Solution 1
Solution 2
Solution 3
Try checking the LD_LIBRARY_PATH. You might point in there to another version of that library that does not support the symbol the numpy call needs. I had the same situation on my Mac.
But be careful, the problem might not be visible directly, because one library could link to the next using the LD_LIBRARY_PATH.
You can check if you see a difference in the following command with and without the LD_LIBRARY_PATH set (to remove temporarily for the active shell: unset LD_LIBRARY_PATH):
ldd /usr/lib/liblapack.so.3gf
In my case, libraries provided by the ISIS software system clashed with the onboard libraries that numpy requires.