mkvirtualenv shop_env
新建完虚拟环境,重启一下VScode,终端也要重启,再选择进入虚拟环境
pip install flask
# manager.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "测试Flask"
if __name__ == "__main__":
app.run(debug=True)