title: pyconfig.h not found while compiling Boost
body: <p>I am having been struggling with the Boost C++ libraries and Python. I have up to this point been completely unable to build the boost-python libraries. </p>
  
  <p>The steps that I follow are:</p>
  
  <ul>
  <li>Download and unzip boost (currently trying to install 1.55.0, because 1.59.0 also did not want to work)</li>
  <li>Inside the boost_1_55_0 folder</li>
  <li>I type <code>./bootstrap.sh --with-python=python --prefix=/home/username/boost_prefix/</code> </li>
  <li>Then I type <code>./b2</code></li>
  <li>When the compiler gets to the parts containing python I seem to get many errors looking like:
  
  <blockquote>
    <p>compilation terminated.</p>
    
    <p>"g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -m64  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"." -c -o "bin.v2/libs/python/build/gcc-4.8.3/release/threading-multi/errors.o"
    "libs/python/src/errors.cpp"</p>
    
    <p>...failed gcc.compile.c++
    bin.v2/libs/python/build/gcc-4.8.3/release/threading-multi/errors.o...
    gcc.compile.c++
    bin.v2/libs/python/build/gcc-4.8.3/release/threading-multi/module.o In
    file included from ./boost/python/detail/prefix.hpp:13:0,
                     from ./boost/python/scope.hpp:8,
                     from libs/python/src/module.cpp:9: ./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h:
    No such file or directory  # include </p>
  
  <pre><code>                   ^ 
  </code></pre>
    
    <p>compilation terminated.</p>
  </blockquote></li>
  </ul>
  
  <p>Initially I thought that this is okay, because the documentation on boost says that you have to build the python part separately. (<a href="http://www.boost.org/doc/libs/1_59_0/libs/python/doc/building.html#id28" rel="nofollow noreferrer">http://www.boost.org/doc/libs/1_59_0/libs/python/doc/building.html#id28</a>)</p>
  
  <p>So I follow the instructions </p>
  
  <pre><code>username$ cd libs/python/example/quickstart/
  username$ ../../../../bjam toolset=gcc --verbose-test test
  </code></pre>
  
  <p>If left to complete the test example does not work and during compilation the output is very similar to the output above: </p>
  
  <blockquote>
    <p>Performing configuration checks</p>
  
  <pre><code>- 32-bit                   : no  (cached)
  - 64-bit                   : yes (cached)
  - arm                      : no  (cached)
  - mips1                    : no  (cached)
  - power                    : no  (cached)
  - sparc                    : no  (cached)
  - x86                      : yes (cached)
  - symlinks supported       : yes (cached) ...patience... ...patience... ...found 1938 targets... ...updating 37 targets...
  </code></pre>
    
    <p>gcc.compile.c++ bin/gcc-4.8.3/debug/extending.o In file included from
    ../../../../boost/python/detail/prefix.hpp:13:0,
                     from ../../../../boost/python/class.hpp:8,
                     from extending.cpp:5: ../../../../boost/python/detail/wrap_python.hpp:50:23: fatal error:
    pyconfig.h: No such file or directory  # include 
                           ^ compilation terminated.</p>
  
  <pre><code>"g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC    -I"../../../.." -I"/usr/include/python2.7" -c -o "bin/gcc-4.8.3/debug/extending.o" "extending.cpp"
  </code></pre>
    
    <p>...failed gcc.compile.c++ bin/gcc-4.8.3/debug/extending.o...
    gcc.compile.c++
    ../../../../bin.v2/libs/python/build/gcc-4.8.3/debug/numeric.o In file
    included from ../../../../boost/python/detail/prefix.hpp:13:0,
                     from ../../../../boost/python/numeric.hpp:8,
                     from ../../../../libs/python/src/numeric.cpp:6: ../../../../boost/python/detail/wrap_python.hpp:50:23: fatal error:
    pyconfig.h: No such file or directory  # include 
                           ^ compilation terminated.</p>
  
  <pre><code>"g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC -m64  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE  -I"../../../.." -I"/usr/include/python2.7" -c -o "../../../../bin.v2/libs/python/build/gcc-4.8.3/debug/numeric.o"
  </code></pre>
    
    <p>"../../../../libs/python/src/numeric.cpp"</p>
    
    <p>...failed gcc.compile.c++
    ../../../../bin.v2/libs/python/build/gcc-4.8.3/debug/numeric.o...
    gcc.compile.c++
    ../../../../bin.v2/libs/python/build/gcc-4.8.3/debug/list.o In file
    included from ../../../../boost/python/detail/prefix.hpp:13:0,
                     from ../../../../boost/python/list.hpp:8,
                     from ../../../../libs/python/src/list.cpp:5: ../../../../boost/python/detail/wrap_python.hpp:50:23: fatal error:
    pyconfig.h: No such file or directory  # include 
                           ^ compilation terminated.</p>
  </blockquote>
  
  <p>I am running Centos 7 on a clean install on a 64bit system. I would appreciate any help so much!</p>