为什么yocto scipy配方需要显式设置python3?怎么用?

为什么yocto scipy配方需要显式设置python3?怎么用?,python,yocto,bitbake,Python,Yocto,Bitbake,我有一个构建scipy的方法,它解析得很好,bitbake开始构建,但是python3 未满足版本要求。它以 | DEBUG: Executing shell function do_configure | Traceback (most recent call last): | File "setup.py", line 31, in <module> | raise RuntimeError("Python version >= 3.5 required.")

我有一个构建scipy的方法,它解析得很好,bitbake开始构建,但是python3 未满足版本要求。它以

| DEBUG: Executing shell function do_configure
| Traceback (most recent call last):
|   File "setup.py", line 31, in <module>
|     raise RuntimeError("Python version >= 3.5 required.")
| RuntimeError: Python version >= 3.5 required.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/marius/mender-qemu/build/tmp/work/core2-64-poky-linux/python3-scipy/1.4.1-r0/temp/log.do_configure.30478)
这是python-scipy.inc

inherit setuptools3 distutils
require python-scipy.inc
另外,我尝试添加
继承python3native
,但没有效果


我的问题是:如何显式地设置python3来构建这个配方?

我的猜测是,作为构建的一部分,您运行的python脚本setup.py需要在主机(构建Yocto的系统)上使用python3

您可以这样安装它:

sudo apt-get install python3

简单而明显的解决方案是
继承distutils3
,而不是
继承distutils

注意:我可以在这里找到一个现成的python scipy配方:


干得好,伙计们

谢谢你的快速回复!据我所知,Python3已经安装在主机上,bitbake也在主机上运行。确保:我如何确认启动了哪一个python版本?作为后续:其他配方为python3构建良好。例如,我还尝试了使用
inherit python3native
,但没有任何效果。我猜Yocto使用了默认的python,您可以通过运行“which python”来检查它是什么。您的脚本可能还定义了它使用的python。它应该看起来像“#!/usr/bin/env python3”你说的“你的脚本”是什么意思?那个婊子?澄清一下:我对python很有经验。这不是问题所在。它与bitbake更相关。错误在“setup.py”脚本中,我不确定它是谁的脚本。我不记得它是Yocto的一部分(或者我只是从来没有遇到过问题)
sudo apt-get install python3