title: Fatal error: Python.h no such file or directory - but python-dev is already installed
body: <p>I am trying to install mod_wsgi on Ubuntu. When running the "sudo make" command <a href="https://modwsgi.readthedocs.io/en/develop/user-guides/quick-installation-guide.html#building-the-source-code" rel="nofollow noreferrer">as described on the mod_wsgi website</a> I receive the error:</p>
  
  <pre><code>src/server/wsgi_python.h:24:10: fatal error: Python.h: No such file or directory
  </code></pre>
  
  <p>The <a href="https://modwsgi.readthedocs.io/en/develop/user-guides/installation-issues.html#missing-python-header-files" rel="nofollow noreferrer">mod_wsgi troubleshoot section</a> and other posts on SO (<a href="https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory">1</a>,<a href="https://stackoverflow.com/questions/19843945/psycopg-python-h-no-such-file-or-directory">2</a>,<a href="https://stackoverflow.com/questions/40157236/fatal-error-python-h-no-such-file-or-directory-not-solved-with-python-devel">3</a>) say to install python-dev of the correct version. This is already done based on the below output. Python3 running 3.6.7 and apt-get saying python3-dev is on the newest version of 3.6.7.</p>
  
  <pre><code>$ python3
  Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
  
  $ sudo apt-get install python3-dev
  ...
  python3-dev is already the newest version (3.6.7-1~18.04).
  0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
  </code></pre>
  
  <p>So it seems like the Python.h file is there but <code>make</code> can't find it. I looked at this SO post (<a href="https://stackoverflow.com/questions/8282231/i-have-python-on-my-ubuntu-system-but-gcc-cant-find-python-h">4</a>) but I don't think it applies to me as I <em>am</em> able to locate Python.h.</p>
  
  <pre><code>$ locate Python.h
  /usr/include/python3.6m/Python.h
  </code></pre>
  
  <p>I am unsure where to go next with this. Python3.6-dev is installed and I can locate Python.h, but <code>make</code> cannot. I am using a venv that Pycharm created for me automatically and I have a hunch it's involved in the problem but I'm not sure how to follow up on this hunch. I am running <code>make</code> on the same terminal as <code>python3</code> and <code>apt-get</code> so they should be using same environment vars (is my understanding).</p>
  
  <p>Any suggestions from anyone on next steps?</p>