# 模块未找到错误：没有名为 'flask_sqlalchemy' 的模块

- **ID:** `python/flask-import-error-module`
- **领域:** python
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

当前 Python 环境中未安装所需的 Flask 扩展。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **Install the correct package via pip** (95% 成功率)
   ```
   pip install Flask-SQLAlchemy
   ```
2. **Check if the package is installed and activate correct environment** (90% 成功率)
   ```
   pip list | grep Flask-SQLAlchemy
# or use conda environment
   ```

## 无效尝试

- **Installing the wrong package name** — The package name might be different (e.g., Flask-SQLAlchemy vs flask_sqlalchemy). (70% 失败率)
- **Installing in the wrong virtual environment** — The environment where the app runs doesn't have the package. (80% 失败率)
