我在buildroot中添加scikit-learn包,但它在构建步骤中需要scipy依赖性,因此我在python-scipy.mk
中添加host-python-scipy
,如下所示:
HOST_PYTHON_SCIPY_DEPENDENCIES += \
host-python-numpy \
host-python-pythran \
zlib \
lapack \
python-numpy \
python-pybind
然后我rebuild
scikit-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
是做什么用的?有没有办法在不避免测试执行的情况下解决这个问题?我能得到一些帮助吗?
1条答案
按热度按时间2vuwiymt1#
请查看https://patchwork.ozlabs.org/project/buildroot/list/?series=314036上的补丁系列,它将scikit-learn添加到Buildroot(但尚未审查/合并)。
scikit-learn和scipy打包起来相当复杂,因此在执行此操作时遇到麻烦也就不足为奇了。