电脑环境macOS Python版本2.7和3.7.4
数据库MySQL
工具pycharm
操作:
我根据"程序配置说明.docx",第5步第4点中使用migrate创建数据表中的命令创建数据表(命令如下),报ModuleNotFoundError: No module named 'flask_sqlalchemy'的错误,然后我用pip/pip3 install SQLAlchemy命令安装,显示安装成功了,但是还是报这个错误.后来我在pycharm点击run运行程序,报KeyError: <flask.cli.ScriptInfo object at 0x10ea7a450>错误. 目前我不知道怎么解决,麻烦老师帮我看看,怎么解决.谢谢.
python manage.py db init
我本地Python环境
export PATH=${PATH}:/usr/local/mysql/bin
# Setting PATH for Python 2.7
PATH="/System/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
# Setting PATH for Python 3.7.4
PATH="/usr/local/Cellar/python/3.7.4/bin:${PATH}"
alias python2='/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7'
alias python3='/usr/local/Cellar/python/3.7.4/bin/python3.7'
alias python=python3
#export PATH=${PATH}:/usr/local/Cellar/python/3.7.4/bin
#export PATH=${PATH}:/System/Library/Frameworks/Python.framework/Versions/2.7/bin
export WORKON_HOME=~/python/pyEnv
VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
source /usr/local/bin/virtualenvwrapper.sh