我已经在全局安装了virtualenv并在flaskr文件夹中激活了它。我还在虚拟环境中点了安装的烧瓶,它在scripts文件夹中作为flask.exe,但每次我都运行:
set FLASK_APP=flaskr
set FLASK_DEBUG=1
flask run
我收到此错误:
(ENV) C:\Users\Owner\Desktop\flaskr>flask run
* Serving Flask app "flaskr"
* Forcing debug mode on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
c:\users\owner\desktop\flaskr\env\scripts\python.exe: can't open file 'C:\Users\Owner\Desktop\flaskr\ENV\Scripts\flask': [Errno 2] No such file or directory
我做错了什么?
答案 0 :(得分:0)
尝试使用
运行它python -m flask run
Python查找名为flask的脚本,但在Windows上它被称为flask.exe。因此找不到它。
在错误中,它也写不了scripts\flask