# ModuleNotFoundError: 没有名为 'requests' 的模块

- **ID:** `python/pip-module-not-found-after-install`
- **领域:** python
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

包被安装到了与运行脚本不同的 Python 解释器/site-packages 中（例如 pip 与 python3 不同，或虚拟环境未激活）。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   python -m pip install requests  # use the same python that runs your script
   ```
2. **** (90% 成功率)
   ```
   python -c "import sys; print(sys.executable, sys.path)"
python -m pip show requests
   ```

## 无效尝试

- **** — Installs into the system Python, not the active interpreter, worsening the mismatch. (70% 失败率)
- **** — Does not fix the interpreter mismatch and breaks when environments change. (60% 失败率)
