我在 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 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
用于?有没有办法在不避免测试执行的情况下解决这个问题?我可以寻求帮助吗?