# /usr/bin/python3：没有名为 pip 的模块

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

## 根因

该解释器未安装 pip（常见于精简的 Debian/Ubuntu 镜像中 python3-pip 是单独包，或新编译/嵌入式 Python 未包含 ensurepip）。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (85% 成功率)
   ```
   python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip
   ```
2. **** (90% 成功率)
   ```
   sudo apt-get install -y python3-pip  # Debian/Ubuntu
# or
sudo dnf install -y python3-pip
   ```
3. **** (80% 成功率)
   ```
   curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
   ```

## 无效尝试

- **** — pip isn't installed, so the command itself fails. (95% 失败率)
- **** — pip isn't present anywhere on disk. (90% 失败率)
- **** — Only works if that interpreter has pip; the target one still doesn't. (70% 失败率)
