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

前端 未结 14 1878
囚心锁ツ
囚心锁ツ 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:16

    If you're using powershell, make sure you add quotations when setting the environment variable:

    $env:FLASK_APP = "app.py

    Then flask run should work.

提交回复
热议问题