python - Flask application error, cannot find the directory of the file. [Errno 2] No such file or directory? -


i tried run application typing python3 runserver.py in command line.

but keep getting following error when try run flask application.

/library/frameworks/python.framework/versions/3.5/resources/python.app/contents/macos/python: can't open file 'runserver': [errno 2] no such file or directory

i using file structure described here -> larger applications - flask

this how project structured:

- myproject     - myproject         - __init__.py         - myproject.py (views here)         - schema.sql         - static             - beautify.css         - templates            - stuff1.html            - stuff1.html            - stuff3.html     - runserver.py 

when i'm running script python can't find runserver.py though i'm running in directory runserver located in.

i running myproject/.

one issue might how package structured, might python looking in wrong place runserver.py error shows /library/frameworks/python/framework... /python, isn't runserver.py located in. why looking in directory?

any insight appreciated,

thanks

runserver.py   myblog import app app.run(debug=true) 

    __init__.py  flask import flask app = flask(__name__)  import myblog.myblog 


Comments