title: Install mod_wsgi with Python 2.7 on Windows 64 bit
body: <p>I'm trying to deploy my Django website, which is written using Python 2.7, on a windows 64 bit machine (Windows Server 2008 R2). I installed the pre-compiled version of Apache (Apache 2.4.16 x64) from <a href="https://www.apachehaus.com/cgi-bin/download.plx" rel="nofollow">https://www.apachehaus.com/cgi-bin/download.plx</a> (due to lack of option provided by Apache Lounge***), and have checked that Python 2.7 runs on 64 bit and compiles with VC9. I wasn't able to find a pre-built binary for mod_wsgi (for Windows 64 bit and compiled with VC9), so I downloaded the source code for mod_wsgi from <a href="https://github.com/GrahamDumpleton/mod_wsgi/releases/tag/4.4.13" rel="nofollow">https://github.com/GrahamDumpleton/mod_wsgi/releases/tag/4.4.13</a> and followed the direction from <a href="https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst" rel="nofollow">https://github.com/GrahamDumpleton/mod_wsgi/blob/develop/win32/README.rst</a>, changing the <code>ap24py27-win64-VC9.mk</code> file to point at the right directories for <code>APACHE_ROOTDIR</code> and <code>PYTHON_ROOTDIR</code>, and using C++ 2008 64-bit Command Prompt to run the command <code>nmake -f ap24py27-win64-VC9.mk clean</code>. However, this gave me the error:</p>
  
  <pre><code>wsgi_memory.obj : error LNK2019: unresolved external symbol GetProcessMemoryInfo referenced
    in function getPeakRSS
  mod_wsgi.so : fatal error LINK1120: 1 unresolved externals
  NMAKE : fatal error U1077: `"...\Visual C++ for Python\9.0\VC\Bin\amd64\c1.EXE"` :
    return code `0x2`
  Stop.
  </code></pre>
  
  <p>I have read the installation and configuration documents for mod_wsgi multiple times and have searched the web including SO for the past few hours to no avail. What am I doing wrong here and how could I fix it?</p>
  
  <p>***I know the official document for installing mod_wsgi warns against using binaries from other sources than Apache Lounge but I don't seem to be able to find the right compiled version (for VC9 and Windows 64 bit) from the site. Could this be a problem and if so, how could I fix it?</p>
  
  <p><strong>Update</strong>: following Adelin's suggestion, I was able to get <code>namke -f ap24py27-win64-VC9.mk clean</code> to run. However, when I try running <code>namke -f ap24py27-win64-VC9.mk</code> or <code>namke -f ap24py27-win64-VC9.mk install</code>, I get pages of warnings that say: <code>warning C4820: '...' : '...' bytes padding added after data member '...'</code> until the compiler quits with</p>
  
  <pre><code>fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
  ...\mod_wsgi-4.4.13\src\server\wsgi_memory.c&lt;124&gt; : warning C4711: function 'getCurrentRSS' selected for automatic inline expansion
  NMAKE: fatal error U1077: '"C:\...\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\c1.EXE"' : return code '0x2'
  Stop.
  </code></pre>
  
  <p>Does anyone have any idea why this might be and how I should go about fixing it?</p>