Run Flask 1.* on Windows 10


25/03/2019, 23:23

First of all install and use Cmder

// cd to your app.py folder
set FLASK_APP=app.py
set FLASK_ENV=development
flask run

If you try to execute in PowerShell this commands:

set FLASK_APP=app.py
flask run

An Error message will appear:

Error: Could not locate flask application. You did not provide the FLASK_APP environment variable

Under Win 10 and PowerShell you should change syntax to:

$env:FLASK_APP="app.py"
$env:FLASK_DEBUG=1
flask run

Better way is to use Cmder, this is most adequate terminal emulator for Windows for now.



Комментарии