Flask configuration for training

Hello,
I'm trying to setup the Neo4J-Flask course but, after some tries I still receive the same error when launch Flask run command:
"Error: While importing 'api', an ImportError was raised."
below the full cmd log.
New to Flask configuration (Windows).
Thanks for hints.
Best regards

(sandbox) C:\VirtualEnv\Neo4J_Flask>flask run

  • Serving Flask app 'api' (lazy loading)
  • Environment: development
  • Debug mode: on
    Usage: flask run [OPTIONS]
    Try 'flask run --help' for help.

Error: While importing 'api', an ImportError was raised.

Hey Roberto, Welcome to the community!

I hate these errors! When I've come across this before I have added PYTHONPATH=. to the command which seemed to fix it. There are a couple of hints here that may also help you solve the problem.

Hey Adam, I run into same problem as Roberto. Trying to setup Building Neo4J Application with Python ends up with:

(sandbox) app-python % flask run
flask run

  • Serving Flask app 'api' (lazy loading)
  • Environment: development
  • Debug mode: on
    Usage: flask run [OPTIONS]
    Try 'flask run --help' for help.
    Error: While importing 'api', an ImportError was raised.

Same holds for all hints from Help, failing on "flask run", e.g.:

(sandbox) app-python % FLASK_APP=api FLASK_ENV=development flask run
FLASK_APP=api FLASK_ENV=development flask run

  • Serving Flask app 'api' (lazy loading)
  • Environment: development
  • Debug mode: on
    Usage: flask run [OPTIONS]
    Try 'flask run --help' for help.
    Error: While importing 'api', an ImportError was raised.

I'm using: macOS 12.2.1, zsh 5.8, Python 3.10.4, pip 22.0.4

Any ideas ? Thanks!