Env. Variables not set while running Minimal Flask application

前端 未结 19 2006

I am trying to follow the flask documentation on my windows machine given at the following link: http://flask.pocoo.org/docs/0.11/quickstart/#debug-mode

Firstly I wrote

19条回答
  •  一向
    一向 (楼主)
    2021-01-30 03:53

    If you are using powershell it does not works i dont know why please use cmd.exe since i use VScode editor it provide powershell as a terminal(ctrl+) by default so i was trying to run flask app on the powershell and it was giving me same response as you are getting

    1) open cmd.exe (or if you are VSCode user like me simply write cmd on that terminal)

    2) set FLASK_APP=hello.py (without spaces, only for first run then it remember until restart of cmd)

    3) flask run (or just flask will also work)

    note: this is only for windows user

提交回复
热议问题