Home>

I'm trying to run Flask in a terminal.

I typed the following command under the folder flask_setup_example, but I get an error message and cannot start it.

$export FLASK_APP = flaskr
$export FLASK_ENV = development
$flask run

I checked the folder name and extension of the error content, but I'm in trouble because I don't know any other solution.

Usage: flask run [OPTIONS]
Error: The file/path provided (flaskr) does not appear to exist. Please verify the path is correct. If app is not on PYTHONPATH, ensure the extension is .py
Corresponding source code

flask_setup_example/flaskr/__ init__.pyThe following programs are placed in the path.

from flask import Flask
def create_app (test_config = None):
    app = Flask (__ name__)
    return app
Supplementary information (FW/tool version, etc.)

python Python 3.6.0 :: Anaconda 4.3.0
macOS Catalina version 10.15
Terminal version 2.10