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

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

## 根因

环境中未安装所需的 Python 包。

## 版本兼容性

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

## 解决方案

1. **** (100% 成功率)
   ```
   Install the package: pip install some_dependency
   ```
2. **** (95% 成功率)
   ```
   Add it to requirements.txt and run pip install -r requirements.txt
   ```

## 无效尝试

- **** — This hides the error but the functionality is still broken. (60% 失败率)
- **** — If the module isn't installed, relative imports won't help. (80% 失败率)
