ModuleNotFoundError: No module named flask_sqlalchemy
时间: 2023-10-15 07:27:59 浏览: 730
ModuleNotFoundError: No module named 'flask_sqlalchemy' 是一个报错信息,意味着你的项目中缺少了名为'flask_sqlalchemy'的模块。解决这个问题的办法如下所述:
1. 通过命令行使用pip安装flask_sqlalchemy模块。打开命令行终端,输入以下命令:
```
pip install flask_sqlalchemy
```
这会自动下载并安装flask_sqlalchemy模块。
2. 如果你使用的是pycharm,可以通过pycharm的设置菜单进行模块安装。打开pycharm,进入Settings/Preferences对话框,找到项目相关的设置,并在其中查找到"Python Interpreter"选项。在该选项中,你可以找到已安装的模块列表,并可以在其中搜索并安装flask_sqlalchemy模块。
请确保按照上述方法之一安装了flask_sqlalchemy模块,然后重新运行你的代码,这样就应该解决了ModuleNotFoundError: No module named 'flask_sqlalchemy'的问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [ModuleNotFoundError: No module named ‘sqlalchemy](https://blog.csdn.net/QQ315806208/article/details/122051329)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [浅谈pycharm下找不到sqlalchemy的问题](https://download.csdn.net/download/weixin_38723513/13768586)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [ImportError: No module named ‘flask_sqlalchemy](https://blog.csdn.net/weixin_48419914/article/details/122232010)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文