简体   繁体   English

NumPy的lapack导入错误

[英]lapack import error with NumPy

Trying to import numpy in Python 2.6 I run into: 尝试在python 2.6中导入numpy我遇到了:

from numpy.linalg import lapack_lite 从numpy.linalg导入lapack_lite

ImportError: libmkl_lapack.so: cannot open shared object file: No such file or directory ImportError:libmkl_lapack.so:无法打开共享库文件:没有这样的文件或目录

There are multiple instances of Intel's Math Kernel Library on the machine providing libmkl_lapack.so and I'm pointing at them with every relevant or semi-relevant environmental variable I can think of (most notably, I guess, $LD_LIBRARY_PATH and $PYTHONPATH). 在提供libmkl_lapack.so的计算机上,有多个英特尔数学内核库实例,我为它们提供了我能想到的每个相关或半相关的环境变量(最值得注意的是,我猜$ LD_LIBRARY_PATH和$ PYTHONPATH)。 I don't have permission to run ldconfig. 我没有运行ldconfig的权限。

This is on a well-used machine and there are multiple Python and NumPy installs. 这是在使用良好的计算机上,并且安装了多个Python和NumPy。 Python2.6 is in my /home/ me /usr/ but there is an older installation of Python2.4 in /usr/ which will import lapack_lite without issue. python2.6的是我的/ home / 的/ usr /但在/ usr /一个旧的python2.4安装的,将导入lapack_lite没有问题。 So I'm not sure where to go from here. 所以我不确定从这里去哪里。

Thanks for anything! 谢谢你!

you can try 你可以试试

strace python your_script.py

to see what it is trying. 看看它在尝试什么。

That will trace all syscalls, therefore showing you the underlying open made by python. 这将跟踪所有系统调用,因此向您显示python进行的底层打开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM