from flask_script import Manager app = Flask(__name__) manager=Manager(app) ... if __name__ == '__main__': manager.run() #以后在执行,直接:python3 manage.py runserver #python3 manage.py runserver --help