gpt4 book ai didi

python - 将 Yocto 与默认使用 python3 的发行版一起使用

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:36:47 25 4
gpt4 key购买 nike

越来越多的 Linux 发行版使用 python 3.x 作为默认 python,但是 Yocto仍然使用python 2.7。如何将 Yocto 与这些发行版之一一起使用?

最佳答案

Yocto 始终在虚拟环境中运行。但是我找到了一种方法来欺骗它使用 python 2 ,设置默认的 python 并将其包含在 PATH 环境变量中:

$ source oe-init-build-env build
$ mkdir build/python-bin
$ ln -s /usr/bin/python2 build/python-bin/python
$ ln -s /usr/bin/python2-config build/python-bin/python-config
$ export PATH=$(pwd)/build/python-bin:${PATH}

感谢大家的帮助!

关于python - 将 Yocto 与默认使用 python3 的发行版一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28360862/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com