Some python libraries aren't copied to the final image. The `on_install` method creates the expected files and directories in `tmp/work/core2-64-poky-linux/python/2.7.16-r0/sysroot-destdir/usr/lib/python2.7/`, but they do not exist in the generated image (tested with `runqemu qemux86-64 nographic`. I am using an up-to-date copy of the master branch and am building with `bitbake core-image-base`. The only modification to the files generated by `. ./oe-init-build-env` is the following line appended to `conf/local.conf`: IMAGE_INSTALL_append = " python"
Sorry about the typo, instead of `on_install` it should say `do_install`.
What libraries were missing.
Turns out we never did fix python2 to have the same behaviour as python3 here. The fix moving forward to is to use a patch I just sent to the list, but for now you can just add 'python-modules' instead. Also, remember that Python 2 is EOL next year and you should be migrating to Python 3. :)
Fixed in oe-core 778a6b4bf6aa9d0941d52ee05e14b061b659b3df.