title: mpi4py on Ubuntu: pyconfig.h not found
body: <p>I am trying to install MPI and mpi4py on an Ubuntu server in order to test some python code that I am running on my mac. I installed OpenMPI from source, and then downloaded a tar of mpi4py and attempted to run <code>python setup.py build</code>. However it fails with:</p>
  
  <pre><code>src/mpi4py.MPI.c:8:22: fatal error: pyconfig.h: No such file or directory
  
  #include "pyconfig.h"
  
                    ^
  
  compilation terminated.
  
  error: command '/usr/local/bin/mpicc' failed with exit status 1
  </code></pre>
  
  <p>I also tryed installing MPICH with <code> sudo apt-get install libcr-dev mpich2 mpich2-doc</code> and then running <code>setup</code>, but it still gives me the same error.</p>
  
  <p>I have searched the internet but still could not figure it out.</p>
  
  <p>Is there a directory I am missing on my PATH?</p>
  
  <p>EDIT: After some more searching it seems that pyconfig.h is supposed to be in <code>/usr/include/python2.7/</code>. This is the case on my mac, however, when I <code>ls </code> the directory on my Ubuntu server it does not contain pyconfig.h. Is this the issue?</p>