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

- **ID:** `python/pip-uninstall-script-not-found`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

该包通过 distutils 安装（如 apt、系统 Python 或旧的 setup.py install），没有 RECORD 文件，因此 pip 无法枚举其文件以安全删除。

## 版本兼容性

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

## 解决方案

1. **** (90% 成功率)
   ```
   Remove via the distro package manager: sudo apt remove python3-package
   ```
2. **** (75% 成功率)
   ```
   List files and remove them: pip show -f package && rm -rf $(pip show -f package | awk '/Location:/{print $2}')/package*
   ```
3. **** (92% 成功率)
   ```
   Create a fresh venv and reinstall the correct version: python -m venv .venv && . .venv/bin/activate && pip install package
   ```

## 无效尝试

- **** — -y skips the confirmation prompt but does not bypass the distutils detection. (90% 失败率)
- **** — Force-reinstall may leave the old distutils files in place, causing version conflicts. (70% 失败率)
- **** — Manual deletion misses .dist-info, .pth, and console scripts, leaving a broken environment. (80% 失败率)
