numpy.distutils.system_info.NotFoundError:未找到 BLAS/LAPACK 库

2024-02-14

我在 buildroot 中添加 scikit-learn 包,但它在构建步骤中需要 scipy 依赖项,所以我添加host-python-scipy in python-scipy.mk如下,

HOST_PYTHON_SCIPY_DEPENDENCIES += \
        host-python-numpy \
        host-python-pythran \
        zlib \
        lapack \
        python-numpy \
        python-pybind

then I rebuildscikit-learn,但它给出了另一个错误No BLAS/LAPACK libraries found:

/xxx/buildroot/output/host/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:196: UserWarning: `install_requires` overwritten in `pyproject.toml` (dependencies)
  warnings.warn(msg)
INFO: lapack_opt_info:
INFO: lapack_armpl_info:
INFO: customize UnixCCompiler
INFO:   libraries armpl_lp64_mp not found in ['/xxx/buildroot/output/host/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: lapack_mkl_info:
INFO:   libraries mkl_rt not found in ['/xxx/buildroot/output/host/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: openblas_lapack_info:
INFO:   libraries openblas not found in ['/xxx/buildroot/output/host/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: openblas_clapack_info:
INFO:   libraries openblas,lapack not found in ['/xxx/buildroot/output/host/lib']
INFO:   NOT AVAILABLE
INFO:
INFO: flame_info:
INFO:   libraries flame not found in ['/xxx/buildroot/output/host/lib']
INFO:   NOT AVAILABLE

...

numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found.
To build Scipy from sources, BLAS & LAPACK libraries need to be installed.

...

Buildroot有吗MKL图书馆?我怎样才能添加它?

我遵循了答案中的建议,但遇到了另一个问题:

Traceback (most recent call last):
  File "/home/xxx/buildroot/output/build/python-scikit-learn-1.1.2/setup.py", line 329, in <module>
    setup_package()
  File "/home/xxx/buildroot/output/build/python-scikit-learn-1.1.2/setup.py", line 325, in setup_package
    setup(**metadata)
  File "/home/xxx/buildroot/output/host/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup
    config = configuration()
...
FileNotFoundError: [Errno 2] No such file or directory: './test_program'
make: *** [package/pkg-generic.mk:293: /home/xxx/buildroot/output/build/python-scikit-learn-1.1.2/.stamp_built] Error 1

是什么pkg-generic用于?有没有办法在不避免测试执行的情况下解决这个问题?我可以寻求帮助吗?


请检查补丁系列:https://patchwork.ozlabs.org/project/buildroot/list/?series=314036 https://patchwork.ozlabs.org/project/buildroot/list/?series=314036它将 scikit-learn 添加到 Buildroot(但尚未经过审查/合并)。

scikit-learn 和 scipy 的打包相当复杂,因此在执行此操作时遇到麻烦也就不足为奇了。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

numpy.distutils.system_info.NotFoundError:未找到 BLAS/LAPACK 库 的相关文章

随机推荐