# 错误：无法卸载 'numpy'。它是通过 distutils 安装的项目，因此我们无法准确判断哪些文件属于它，这会导致仅部分卸载。

- **ID:** `python/pip-requirement-already-satisfied-but-wrong-version`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

该包由操作系统包管理器（apt/dnf）或旧式 distutils 路径安装，因此 pip 没有 RECORD 文件来执行干净的卸载。

## 版本兼容性

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

## 解决方案

1. **** (90% 成功率)
   ```
   Remove the OS-managed copy first: `sudo apt-get remove python3-numpy` (or `dnf remove python3-numpy`), then `pip install numpy` inside a venv.
   ```
2. **** (93% 成功率)
   ```
   Work in a fresh venv that does not inherit system site-packages: `python -m venv --system-site-packages=false .venv`.
   ```

## 无效尝试

- **** — Leaves two overlapping copies in site-packages; imports become order-dependent and hard to debug. (70% 失败率)
- **** — The distutils guard still triggers; sudo does not create a RECORD file. (85% 失败率)
