为 numpy 安装 lapack
运行 Ubuntu 11.10 + python2.7...从源代码构建了 numpy 并安装了它,但是当我去安装它时,
ImportError: /usr/lib/liblapack.so.3gf: undefined symbol: ATL_chemv
当它尝试从 numpy.linalg 导入 lapack_lite 时,我得到了。我尝试从头开始重建 lapack,但它似乎只是 make
/usr/local/lib/libblas.a
/usr/local/lib/liblapack.a
/usr/local/lib/libtmglib.a
和 .so 文件。 .so.3gf 从哪里来,如何修复它?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
当您安装了 libopenblas-base 和 libatlas3-base,但未安装 liblapack3 时,就会出现此问题。这种软件包组合会安装 libblas.so(来自 OpenBLAS)和 liblapack.so(来自 ATLAS)的冲突版本。
解决方案 1(我最喜欢):如果您还安装了 liblapack3,则可以在计算机上同时保留 OpenBLAS 和 ATLAS。
解决方案 2:卸载 ATLAS(由于某些 deb 包恶作剧,这实际上会自动为您安装 liblapack3)
解决方案 3:卸载 OpenBLAS
配置错误
解决方案 1
解决方案 2
解决方案 3
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
尝试检查 LD_LIBRARY_PATH。您可能会指出该库的另一个版本不支持 numpy 调用所需的符号。我的 Mac 上也有同样的情况。
但要小心,问题可能不会直接可见,因为一个库可以使用 LD_LIBRARY_PATH 链接到下一个库。
您可以检查以下命令在设置 LD_LIBRARY_PATH 和未设置 LD_LIBRARY_PATH 时是否存在差异(为活动 shell 临时删除:unset LD_LIBRARY_PATH):
ldd /usr/lib/liblapack.so.3gf
在我的情况下,由ISIS 软件系统与 numpy 所需的板载库发生冲突。
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.
我遇到了同样的问题,删除包 libopenblas-base 就解决了问题:
正如其他人已经解释的那样,几个包提供了不兼容版本的 liblapack.so.3gf。
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.
根据我看到的一些错误报告,您可能安装了多个 BLAS/ATLAS/LAPACK 提供程序,例如 ATLAS 和 OpenBLAS/GotoBLAS,它们彼此冲突。看一下:
并检查它们是否都对应于同一个包(例如,它们都指向
/usr/lib/atlas-base/
)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/
)