cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Cannot run Flask (Python version 3.9.7)

Hi, I've seen some errors occurring with Flask and Python version 3.10 but I have 3.9.7 and am getting the following error when trying to do 'flask run' in the Terminal shell.

Any help appreciated!

 

 

Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.

 

1 ACCEPTED SOLUTION

Hello @stephflint ,

Did you copy the .env.example to .env    ?

The FLASK_APP should be set in that file.

Elaine

View solution in original post

2 REPLIES 2

Hello @stephflint ,

Did you copy the .env.example to .env    ?

The FLASK_APP should be set in that file.

Elaine

Thanks @elaine_rosenber - The solution was actually quite simple, I just had to type 'python flask run' in the Terminal