title: Configure Python 3.4 and Django on Windows Azure
body: <p>I have a Windows Azure website that has Python 3.4 setup in the admin console.  Here is the web.config:</p>
  
  <pre><code>&lt;configuration&gt;
  &lt;appSettings&gt;
      &lt;add key="pythonpath" value="D:\home\site\wwwroot\mysite;D:\home\site\wwwroot\site-packages" /&gt;
      &lt;add key="WSGI_HANDLER" value="django.core.handlers.wsgi.WSGIHandler()" /&gt;
      &lt;add key="DJANGO_SETTINGS_MODULE" value="core.settings" /&gt;   
  &lt;/appSettings&gt;
  &lt;system.webServer&gt;
      &lt;handlers&gt;
          &lt;add name="Python_FastCGI"
              path="handler.fcgi"
              verb="*"
              modules="FastCgiModule"
              scriptProcessor="D:\Python34\python.exe|D:\Python34\Scripts\wfastcgi.py"
              resourceType="Either"
              requireAccess="Script" /&gt;
      &lt;/handlers&gt;
      &lt;rewrite&gt;
          &lt;rules&gt;
              &lt;rule name="Django Application" stopProcessing="true"&gt;
                  &lt;match url="(.*)" ignoreCase="false" /&gt;
                  &lt;conditions&gt;
                      &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                  &lt;/conditions&gt;
                  &lt;action type="Rewrite" url="handler.fcgi/{R:1}" appendQueryString="false" /&gt;
              &lt;/rule&gt;
          &lt;/rules&gt;
      &lt;/rewrite&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p></p>
  
  <p>Everything works fine when the scriptProcessor attribute of the fastCGI config is set to use d:\Python27, but it does not work for d:\Python34.  I have used python 2.7 to verify that the files D:\Python34\python.exe and D:\Python34\Scripts\wfastcgi.py do in fact exist on the server.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Just to clarify, the server returns</p>
  
  <pre><code>The page cannot be displayed because an internal server error has occurred.
  </code></pre>
  
  <p>When checking the detailed logs it shows a generic 500 internal server error message pointing it's finger at FastCgiModule.</p>