title: Getting Error in VS Code while running Flask App
body: <p>Trying to run the flask code in Vscode (mac Os x 10.14.15) but getting an error.</p>
  
  <p>First I tried running:
  <code>python3 -m flask run</code></p>
  
  <p>But, it showed </p>
  
  <blockquote>
    <p>"Could locate a Flask application. You didnt provide Flask_App variable or wsgi.py or app.py was not found in the current directory.</p>
  </blockquote>
  
  <p>I then ran the following command:
  <code>export Flask_app = app.py</code>
  (though I didnt need to export the variable since my file name is already app.py)</p>
  
  <p><code>flask run</code></p>
  
  <blockquote>
    <p>Could not import 'app'</p>
  </blockquote>
  
  <p>Please note that I have verified that Flask version 1.0.3 is installed</p>
  
  <p>Here is the code I'm trying to execute:</p>
  
  <pre><code>from flask import Flask
  app = Flask(__name__)
  @app.route("/")
  def home():
      return "Hello, Flask!"
  </code></pre>