title: Flask, IIS, Python, wfastcgi Error occurred while reading WSGI handler: ImportError: cannot import name 'Flask'
body: <p>My problem is that I'm trying to deploy a simple flask <strong>app.py</strong> :</p>
  
  <pre class="lang-python prettyprint-override"><code>from flask import Flask
  app = Flask(__name__)
  @app.route("/")
  def hello():
      return "Hello from FastCGI via IIS!"
  if __name__ == "__main__":
      app.run()
  </code></pre>
  
  <p>with that <strong>web.config</strong>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
       &lt;configuration&gt;
       &lt;system.webServer&gt;
         &lt;handlers&gt;
          &lt;add name="Python FastCGI" path="*" verb="*" 
          modules="FastCgiModule" scriptProcessor="C:\Python34\python.exe|C:\Python34\lib\site-packages\wfastcgi.py" 
      resourceType="Unspecified" requireAccess="Script" /&gt;
         &lt;/handlers&gt;
          &lt;httpErrors errorMode="Detailed" /&gt;
       &lt;/system.webServer&gt;
       &lt;appSettings&gt;
         &lt;!-- Required settings --&gt;
         &lt;add key="WSGI_HANDLER" value="app.app" /&gt;
         &lt;add key="PYTHONPATH" value="D:\Web\flaskapp" /&gt;
      &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>i get the error<strong>Error:</strong></p>
  
  <pre class="lang-txt prettyprint-override"><code>Error occurred while reading WSGI handler:
  
  Traceback (most recent call last):
    File "C:\Python34\lib\site-packages\wfastcgi.py", line 791, in main
      env, handler = read_wsgi_handler(response.physical_path)
    File "C:\Python34\lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler
      handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
    File "C:\Python34\lib\site-packages\wfastcgi.py", line 616, in get_wsgi_handler
      raise ValueError('"%s" could not be imported%s' % (handler_name, last_tb))
  ValueError: "app.app" could not be imported: Traceback (most recent call last):
    File "C:\Python34\lib\site-packages\wfastcgi.py", line 600, in get_wsgi_handler
      handler = __import__(module_name, fromlist=[name_list[0][0]])
    File ".\app.py", line 2, in &lt;module&gt;
      from flask import Flask
  ImportError: cannot import name 'Flask'
  </code></pre>
  
  <p>He dont want import my libs(not all! he can improt time and other like this).</p>
  
  <p>build:</p>
  
  <pre><code>wfastcgi-3.0.0-py3.4.egg-info
  Flask-1.0.2.dist-info
  python 3.4
  IIS 10.0.14393
  </code></pre>
  
  <p>Big thanks for any help.</p>