undefined symbol: clapack_sgesv

故事扮演 提交于 2019-12-01 20:09:31

On Debian, you can use update-alternatives, assuming you have more than reference implementation installed.

From debian wiki

update-alternatives --config liblapack.so.3
update-alternatives --config libblas.so.3

I can't be certain since you didn't specify what distribution you're using, but I ran into the same issue on Gentoo.

/usr/lib and /usr/lib64 have symlinks to the actual libraries. By default, it links to the reference implementation of libblas, libcblas, and liblapack -- which doesn't export symbols for clapack_sgesv, and many other routines.

To resolve this in Gentoo:

sudo emerge blas-atlas
eselect blas list
eselect cblas list
sudo eselect blas set X # Grab X from the result of
sudo eselect cblas set X # the 'list' lines above
sudo emerge lapack-atlas
eselect lapack list
sudo eselect lapack set X
sudo emerge --unmerge scipy numpy matplotlib
sudo emerge scipy numpy matplotlib (... whatever else ...)

I got this problem after an upgrade from Ubuntu 12.04 to 12.10. The problem was that I had two versions of scipy installed in /usr/local/lib/python2.7/dist-packages. To fix the problem I did:

 sudo apt-get remove python-scipy
 sudo rm -fr /usr/local/lib/python2.7/dist-packages/scipy*
 sudo apt-get install python-scipy
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!