通过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 

运行正常

相关文章:

  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2021-08-27
  • 2021-08-30
  • 2021-07-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案