I'm using a pre-release 2.6.1 version + extensible SDK. When I run this from the extensible SDK (not bitbake cooker modus) I get: + devtool add nettoe https://github.com/RobertBerger/nettoe.git + press <ENTER> to go on NOTE: Starting bitbake server... ImportError: No module named site OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3. Please upgrade your python v2. NOTE: Starting bitbake server... NOTE: Fetching git://github.com/RobertBerger/nettoe.git;protocol=https... host# source environment-setup-armv7a-neon-poky-linux-gnueabi host# which python3 /opt/ext-sdk/poky/2.6.1/multi-v7-ml/imx6q-phytec-mira-rdk-nand/buildtools/sysroots/x86_64-pokysdk-linux/usr/bin/python3 host# python3 --version Python 3.5.6 host# which python /usr/bin/python host# python --version Python 2.7.12 I thought we got rid of Python2 a long time ago for OE/Yocto. Do I need to add Python 2 to my SDK now? I am confused about the "upgrade" error.
Looks like it's bitbake, which comes with the SDK which complains about the Python version and not necessarily devtool.
That message isn't bitbake but oe-core: scripts/oe-buildenv-internal: echo >&2 "OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3." And indeed, OE still hard-requires Python 2 to be present because too many upstream still assume that Python 2 is present. A few months ago I removed Py2 to see what broke and a not-insignificant amount of the system wouldn't build. Maybe for 2.8 enough of the ecosystem will have migrated to Python 3 that we won't need to enforce this requirement, but for now you'll need both. The good question is why you're getting an exception although the system claims to have python present. Can you run python interactively and import site? Is there a python binary inside the eSDK?
(In reply to comment #2) > The good question is why you're getting an exception although the system > claims to have python present. Can you run python interactively and import > site? That's without the eSDK environment: python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import site >>> That's with the eSDK environment: source environment-setup-armv7a-neon-poky-linux-gnueabi SDK environment now set up; additionally you may now run devtool to perform development tasks. Run devtool --help for further details. student@e450-1:/opt/ext-sdk/poky/2.6.1/multi-v7-ml/imx6q-phytec-mira-rdk-nand⟫ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import site >>> ⟫which python /usr/bin/python ⟫which python2 /usr/bin/python2 ⟫which python2.7 /usr/bin/python2.7 ⟫which python3 /opt/ext-sdk/poky/2.6.1/multi-v7-ml/imx6q-phytec-mira-rdk-nand/buildtools/sysroots/x86_64-pokysdk-linux/usr/bin/python3 > Is there a python binary inside the eSDK? I checked in buildtools: ⟫find | grep python3$ ./sysroots/x86_64-pokysdk-linux/usr/bin/python3 ⟫ find | grep python2$ nothing ⟫ find | grep python$ nothing in tmp/sysroots/x86_64: ./usr/bin/python-native/python2.7 ./usr/bin/python-native/python2 in tmp/sysroots/x86_64: ./usr/bin/nativepython3
Ross, it appears you NEEDINFO question has been answered. If you have questions put it back in NEEDINFO.
Bouncing to Paul as this is SDK related and he can look at it. Note this is an old bug so may be obsolete by now.
You can reproduce this bug with: wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.6.4/toolchain/x86_64/poky-glibc-x86_64-core-image-sato-armv5e-toolchain-ext-2.6.4.sh then cd and source the env file, then devtool add nettoe https://github.com/RobertBerger/nettoe.git and you will see: richard@jet:/tmp/rptest2$ devtool add nettoe https://github.com/RobertBerger/nettoe.git NOTE: Starting bitbake server... ImportError: No module named site OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3. Please upgrade your python v2. NOTE: Starting bitbake server... but the command does complete successfully. The successful completion is probably why the automated tests don't catch it. So the bug was definitely in 2.6.4.
python2 is no longer supported and 2.6.1 is in community support mode.