Yocto: не умеет строить scikit-Learn по системе сборки yocto - PullRequest
0 голосов
/ 15 апреля 2020

Я установил numpy и scipy, используя yocto (воин), но когда я добавил рецепт scikit-learn, он не может найти рецепт numpy.

Рецепт выглядит так:

SUMMARY = "A set of python modules for machine learning and data mining"
HOMEPAGE = "http://scikit-learn.org"
# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is
# your responsibility to verify that the values are complete and correct.
#
# The following license files were not able to be identified and are
# represented as "Unknown" below, you will need to check them yourself:
#   COPYING
LICENSE = "new-BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=5f6fa516b7dec5faf1c6031236caebce"

SRC_URI = "https://files.pythonhosted.org/packages/18/28/5a48b00599b476875415b97bdfdb3849bafb31183c1d785501dbc8a77aa2/scikit-learn-${PV}.tar.gz"
SRC_URI[md5sum] = "dab189dd5556ae59f7a1efce9c86c002"
SRC_URI[sha256sum] = "51ee25330fc244107588545c70e2f3570cfc4017cff09eed69d6e1d82a212b7d"

S = "${WORKDIR}/scikit-learn-${PV}"

inherit setuptools3

# WARNING: the following rdepends are determined through basic analysis of the
# python sources, and might not be 100% accurate.
RDEPENDS_${PN} += "python3-compression python3-core python3-crypt python3-difflib python3-distutils python3-io python3-json python3-logging python3-math python3-misc python3-numbers python3-pickle python3-pkgutil python3-pprint python3-shell python3-threading python3-unittest python3-numpy"

Данные журнала следующие:

DEBUG: Executing python function externalsrc_compile_prefunc
NOTE: python3-scikit-learn: compiling from external source tree /home/test/build/workspace/sources/python3-scikit-learn
DEBUG: Python function externalsrc_compile_prefunc finished
DEBUG: Executing shell function do_compile
Partial import of sklearn during the build process.
Traceback (most recent call last):
File "setup.py", line 195, in check_package_status
module = importlib.import_module(package)
File "/home/test/build/tmp/work/armv7vet2-neon-phytec-linux-gnueabi/python3-scikit-learn/0.22.1-r0/recipe-sysroot-native/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'numpy'
Traceback (most recent call last):
File "setup.py", line 303, in <module>
setup_package()
File "setup.py", line 291, in setup_package
check_package_status('numpy', NUMPY_MIN_VERSION)
File "setup.py", line 221, in check_package_status
.format(package, req_str, instructions))
ImportError: numpy is not installed.
scikit-learn requires numpy >= 1.11.0.
Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html
ERROR: 'python3 setup.py build ' execution failed.

Ответы [ 2 ]

1 голос
/ 16 апреля 2020

Я создал рецепт для scikit-learn версии 0.20.4, но я использовал pypi, и зависимости были настроены следующим образом:

PYPI_PACKAGE = "scikit-learn"

DEPENDS = "${PYTHON_PN}-numpy-native ${PYTHON_PN}-numpy ${PYTHON_PN}-scipy ${PYTHON_PN}-joblib ${PYTHON_PN}-core"

RDEPENDS_${PN} += "${PYTHON_PN}-numpy ${PYTHON_PN}-scipy"


inherit pypi
inherit setuptools3
inherit distutils3
inherit pkgconfig

В этом случае мой рецепт был назван python3-scikit-learn_0.20.4.bb.

0 голосов
/ 16 апреля 2020

Может быть, попробуйте добавить dep:

DEPENDS += "python-numpy"

Поскольку DEPENDS и RDEPENDS различны:)

...