You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
➜ flask run
* Serving Flask app "api.py" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!* Debugger PIN: 191-109-957
see also #62
pyenv
pyenv相当于node.js中的n或nvm, 用来全局切换python的版本(在pyenv作用范围内)
virtualenv类似于不带
-g
参数的npm,基于当前python解释器给项目创建一个隔离的python环境。show me the code!
详见: https://gtbensmagazine.com/2019/05/07/the-right-and-wrong-way-to-set-python-3-as-default-on-macos/
virtualenv
注意: 只有在项目根目录下创建venv, vs code才能自动检测到
如果不是在项目根目录下。 可以自行修改.vscode/settings.json文件
pip (不要用pip freeze命令!手工维护requirements.txt)
hello flask
api.py
最新的flask (1.1.0+) 已经不需要jsonify了。👏
.flaskenv
gitignore
详见: https://blog.miguelgrinberg.com/post/how-to-create-a-react--flask-project
The text was updated successfully, but these errors were encountered: