Skip to content
Advertisement

terminal error: flask run zsh: command not found: flask

I’m using a Mac , the python version is 2.7.10. and I installed flask

JavaScript

I try to follow the tutorial of flash on http://flask.pocoo.org/docs/1.0/

the commands:

JavaScript

code in flaskblog.py:

JavaScript

The error is command not found: flask

I also tried an other tutorial.

commands:

JavaScript

code in one.py

JavaScript

the condition __name__ == '__name__': did not pass.

I guess the python venv matters.

Really want to know how to fix it.

Advertisement

Answer

You could try python -m flask run instead.

Possible installation issues with flask not present, etc, are mentioned in this section of official Flask documentation.

Advertisement