python
module_error
ai_generated
true
错误:sitecustomize出错;设置PYTHONVERBOSE以获取回溯:ModuleNotFoundError:没有名为'setuptools'的模块
ERROR: Error in sitecustomize; set PYTHONVERBOSE for traceback: ModuleNotFoundError: No module named 'setuptools'
ID: python/pip-egg-link-corrupt
80%修复率
87%置信度
0证据数
2025-02-20首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
根因分析
setuptools包缺失或其.egg-link文件损坏,通常由于部分安装或手动删除。
English
The setuptools package is missing or its .egg-link file is corrupted, often due to a partial install or manual deletion.
解决方案
-
90% 成功率
python -m ensurepip --upgrade
-
85% 成功率
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
-
95% 成功率
python -m venv venv && source venv/bin/activate && pip install setuptools
无效尝试
常见但无效的做法:
-
50% 失败
Pip itself may depend on setuptools.
-
80% 失败
May have incorrect path or permissions.
-
90% 失败
Many packages will fail to import.