Error Running Flask Tutorial: Flaskr App
<p>Having a little trouble running this in my command prompt (I'm in my <code>flaskr</code> directory already). </p>

<p><code>set FLASK_APP=flaskr</code>
<code>set DEBUG_MODE=1</code>
<code>flask run</code></p>

<p><a href="http://flask.pocoo.org/docs/0.11/tutorial/setup/#tutorial-setup" rel="nofollow">http://flask.pocoo.org/docs/0.11/tutorial/setup/#tutorial-setup</a></p>

<p>I've followed all the steps up until now. I've read up on some stuff with virtualenv and stuff, but it hasn't really made sense - should I mess around with it or is there an easier fix?</p>

<p>My output/error log:</p>

<pre><code>Traceback (most recent call last):
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\david\AppData\Local\Programs\Python\Python35-32\Scripts\flask.exe\__main__.py", line 9, in &lt;module&gt;
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 478, in main
    cli.main(args=args, prog_name=name)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 388, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 124, in __init__
    self._load_unlocked()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 148, in _load_unlocked
    self._app = rv = self.loader()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 209, in load_app
    rv = locate_app(self.app_import_path)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 89, in locate_app
    __import__(module)
ImportError: No module named 'flaskr'

C:\Users\david\Documents\Software\Projects\Flaskr&gt;set FLASK_APP=flaskr

C:\Users\david\Documents\Software\Projects\Flaskr&gt;set DEBUG_MODE=1

C:\Users\david\Documents\Software\Projects\Flaskr&gt;flask run
Traceback (most recent call last):
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\david\AppData\Local\Programs\Python\Python35-32\Scripts\flask.exe\__main__.py", line 9, in &lt;module&gt;
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 478, in main
    cli.main(args=args, prog_name=name)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 696, in main
    rv = self.invoke(ctx)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\click\core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 388, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 124, in __init__
    self._load_unlocked()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 148, in _load_unlocked
    self._app = rv = self.loader()
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 209, in load_app
    rv = locate_app(self.app_import_path)
  File "c:\users\david\appdata\local\programs\python\python35-32\lib\site-packages\flask\cli.py", line 89, in locate_app
    __import__(module)
ImportError: No module named 'flaskr'
</code></pre>

<p>You need to install your app as a package on your virtualenv or declare the file extension like <code>FLASK_APP=flaskr.py</code></p>

python flask setup-project