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

前端 未结 14 1906
囚心锁ツ
囚心锁ツ 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 11:00

    My error was also same but fortunately I was able to resolve it. Here you go,

       D:\Development\Projects\Python_Projects\flask_blog>set FLASK_APP=app.py
       D:\Development\Projects\Python_Projects\flask_blog>$env:FLASK_APP = "app.py"
       D:\Development\Projects\Python_Projects\flask_blog>python -m  flask run
    

提交回复
热议问题