title: How to run Flask app as a package in PyCharm
body: <p>I was following <a href="http://flask.pocoo.org/docs/0.12/patterns/packages/#simple-packages" rel="noreferrer">this</a> documentation on directory management for Flask projects. Now, I'm trying to run my flask application from PyCharm. I have added the below mentioned Environment Variables in <code>Edit Configurations...</code>:</p>
  
  <p><code>FLASK_DEBUG=true</code></p>
  
  <p><code>FLASK_APP=&lt;absolute-path-to-root-directory-of-application&gt;</code></p>
  
  <p>I add the <code>Script</code> as <code>flask run</code></p>
  
  <p><a href="https://i.stack.imgur.com/NbBy4.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/NbBy4.jpg" alt="enter image description here"></a></p>
  
  <p>The output running this configuration is this:</p>
  
  <blockquote>
    <p>../red-flask/venv/bin/python "flask run"</p>
    
    <p>../red-flask/venv/bin/python: can't open file 'flask run': [Errno 2] No such file or directory</p>
    
    <p>Process finished with exit code 2</p>
  </blockquote>
  
  <p>My project directory looks like:</p>
  
  <pre><code>/flask_app
      setup.py
      /flask_app
          __init__.py
          views.py
          /static
              style.css
          /templates
              layout.html
              index.html
              login.html
              ...
  </code></pre>
  
  <p>I am unable to figure out how to make this work, any help is appreciated.</p>