# 没有名为 pip 的模块

# 在：python -m venv .venv && source .venv/bin/activate && pip install requests 之后

- **ID:** `python/pip-venv-without-pip`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

venv 使用 --without-pip 创建，或 ensurepip 不可用（Debian 的 python3-venv 分离包），因此新环境没有 pip。

## 版本兼容性

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

## 解决方案

1. **** (95% 成功率)
   ```
   python -m ensurepip --upgrade
python -m pip install --upgrade pip
   ```
2. **** (97% 成功率)
   ```
   sudo apt install python3-venv python3-pip
rm -rf .venv
python3 -m venv .venv
source .venv/bin/activate
python -m pip install requests
   ```

## 无效尝试

- **** — pip is the thing that is missing; the command cannot run. (95% 失败率)
- **** — Mixes system and venv paths, leading to subtle import and shebang issues. (80% 失败率)
