title: Bitbake build failed with configure: error: could not find Python headers
body: <p>I am currently building a yocto image for RPI3 with Yocto poky.Unfortunately the build failed with the following error:</p>
  
  <p>ERROR: Task 1797 (/work/rpi/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.0.bb, do_configure) failed with exit code '1'</p>
  
  <p>This is a part of the error-log:</p>
  
  <pre class="lang-none prettyprint-override"><code>| checking for python script directory... Traceback (most recent call last):
  |   File "&lt;string&gt;", line 22, in &lt;module&gt;
  |   File "/work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", line 22, in &lt;module&gt;
  |     PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
  | TypeError: expected a string or other character buffer object
  | ${libdir}/python2.7/site-packages
  | checking for python extension module directory... Traceback (most recent call last):
  |   File "&lt;string&gt;", line 22, in &lt;module&gt;
  |   File "/work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", line 22, in &lt;module&gt;
  |     PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
  | TypeError: expected a string or other character buffer object
  | ${libdir}/python2.7/site-packages
  | checking for Python headers using /work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr/bin/python-native/python-config --includes... Traceback (most recent call last):
  |   File "/work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr/bin/python-native/python-config", line 6, in &lt;module&gt;
  |     from distutils import sysconfig
  |   File "/work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/distutils/sysconfig.py", line 22, in &lt;module&gt;
  |     PREFIX = os.path.normpath(sys.prefix).replace( os.getenv("BUILD_SYS"), os.getenv("HOST_SYS") )
  | TypeError: expected a string or other character buffer object
  | failed, will try another way
  | checking for Python headers in /work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr and /work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr... -I/work/rpi/poky/build/tmp/sysroots/x86_64-linux/usr/include/python2.7
  | checking whether those headers are sufficient... no
  | configure: error: could not find Python headers
  | NOTE: The following config.log files may provide further information.
  | WARNING: exit code 1 from a shell command.
  | NOTE: /work/rpi/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python-dbus/1.2.0-r0/build/config.log
  | ERROR: configure failed
  | ERROR: Function failed: do_configure (log file is located at /work/rpi/poky/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python-dbus/1.2.0-r0/temp/log.do_configure.4034)
  ERROR: Task 1797 (/work/rpi/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.0.bb, do_configure) failed with exit code '1'
  NOTE: Tasks Summary: Attempted 2561 tasks of which 2560 didn't need to be rerun and 1 failed.
  No currently running tasks (1401 of 2591)
  
  Summary: 1 task failed:
    /work/rpi/meta-openembedded/meta-python/recipes-devtools/python/python-dbus_1.2.0.bb, do_configure
  Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
  </code></pre>
  
  <p>Anybody a guess?
  Thx.</p>