How to setup environment variables for `flask run` on Windows?

前端 未结 14 1916
囚心锁ツ
囚心锁ツ 2021-02-04 10:19

I just started learning flask and I am stuck at setting up the Flask environment variables. I don\'t know how to setup the environment variables. Whenever I use the flask

14条回答
  •  灰色年华
    2021-02-04 10:59

    I used this and it worked because I am doing it in Windows PowerShell.

    $env:FLASK_APP = "app.py"
    

    however, flask run didn't and gave me could not import application.

提交回复
热议问题