越来越多的 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/