python
install_error
ai_generated
true
ERROR: Cannot uninstall 'package_name'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
ID: python/pip-cannot-uninstall-required-by
80%Fix Rate
83%Confidence
0Evidence
2025-09-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
Root Cause
The package was installed via distutils, and pip cannot safely uninstall it.
generic中文
包是通过 distutils 安装的,pip 无法安全卸载。
Workarounds
-
80% success Reinstall the package with pip first
pip install --force-reinstall package_name && pip uninstall package_name
-
90% success Use a virtual environment
python -m venv newenv && source newenv/bin/activate && pip install package_name
Dead Ends
Common approaches that don't work:
-
Using --force to uninstall
50% fail
May leave broken files.
-
Manually deleting files
70% fail
Risky and incomplete.