title: Unable to run Flask from Terminal, “No module named 'my_app’”
body: <p>I was expecting to get the following, but I’m just stuck at this point.</p>
  <pre class="lang-none prettyprint-override"><code>* Serving Flask app &quot;app&quot;
  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  </code></pre>
  <p>In the terminal, I tried running <code>FLASK_APP=run.py flask run</code>, then get</p>
  <blockquote>
  <p>ModuleNotFoundError: No module named 'my_app’</p>
  </blockquote>
  <p>When I tried changing the name in the command to <code>FLASK_APP=__init__.py flask run</code>, I get</p>
  <blockquote>
  <p>Error: Failed to find application in module “myProject”.  Are you sure it contains a Flask application?  Maybe you wrapped it in a WSGI middleware or you are using a factory function.</p>
  </blockquote>
  <p>Here's my project structure:</p>
  <pre><code>myProject/
      |—my_app/
          |— source/
              |— __init__.py
              |— other .py files
          |— static/
          |— templates/
      |— __init__.py
      |— someFile.sqlite
      |— run.py
  </code></pre>
  <p><code>myProject/run.py</code> contains two lines of code:</p>
  <pre><code>from my_app import app 
  app.run()
  </code></pre>
  <p><code>myProject/__init__.py</code> contains nothing, blank.</p>
  <p><code>myProject/source/__init__.py</code> is also blank (but I guess these files just need to be here?)</p>
  <p>I'm having trouble running the files under PyCharm, but when I run the file run.py in Spyder Anaconda, I get the expected message stating the server is running.  Why is it working on Spyder, but not on PyCharm?</p>