通过pip install flask-sqlacodegen后使用命令:flask-sqlacodegen "mysql://root:123456@IP:3306/movie_cat" --tables user --outfile "/Users/user/PycharmProjects/flask.study/common/models/user.py" --flask
提示:-bash: flask-sqlacodegen: command not found
查看flask-sqlacodegen安装目录为:
/Library/Frameworks/Python.framework/Versions/3.6/bin
进入到次目录下运行:./flask-sqlacodegen "mysql://root:123456@IP:3306/movie_cat" --tables user --outfile "/Users/user/PycharmProjects/flask.study/common/models/user.py" --flask
运行正常
Mac 安装flask-sqlacodegen后使用提示 -bash: flask-sqlacodegen: command not found