在这方面我是个新手,请原谅我的无知。在
我想从这个问题开始运行基准测试:
Benchmarking (python vs. c++ using BLAS) and (numpy)
代码可以在这里找到: https://github.com/zed/woltan-benchmark/
运行make
之后,我得到以下错误。在
Traceback (most recent call last):
File "main.py", line 8, in <module>
_blaslib = ctypes.cdll.LoadLibrary("libblas.so")
File "/usr/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libblas.so: cannot open shared object file: No such file or directory
make: *** [Test.csv] Error 1
我猜它找不到libblas.so
库,但不知道它在哪里?如何检查它是否已安装?我在运行Ubuntu 13.10。在
谢谢你
附加信息:
触发main.py
中发现的错误的python代码是:
编辑1:
在运行locate libblas.so
之后,我替换了
_blaslib = ctypes.cdll.LoadLibrary("libblas.so")
与
_blaslib = ctypes.cdll.LoadLibrary("/usr/lib/libblas/libblas/libblas.so.3")
不确定这是否正确,但现在输出如下:
terminate called after throwing an instance of 'char const*'
Aborted (core dumped)
这两个错误(}中找不到{},因此在您的案例中似乎应该使用{}。在
OSError
和“core dumped”)都是由于在main.py
和{我更新了the benchmark,使
libblas.so
名称可配置。在在我的系统(Ubuntu 14.04)上:
以及
^{pr2}$工作。在
^{3}$相关问题 更多 >
编程相关推荐