python module_error ai_generated true

ERROR: Error in sitecustomize; set PYTHONVERBOSE for traceback: ModuleNotFoundError: No module named 'setuptools'

ID: python/pip-egg-link-corrupt

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2025-02-20First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.9 active

Root Cause

The setuptools package is missing or its .egg-link file is corrupted, often due to a partial install or manual deletion.

generic

中文

setuptools包缺失或其.egg-link文件损坏,通常由于部分安装或手动删除。

Workarounds

  1. 90% success
    python -m ensurepip --upgrade
  2. 85% success
    wget https://bootstrap.pypa.io/ez_setup.py -O - | python
  3. 95% success
    python -m venv venv && source venv/bin/activate && pip install setuptools

Dead Ends

Common approaches that don't work:

  1. 50% fail

    Pip itself may depend on setuptools.

  2. 80% fail

    May have incorrect path or permissions.

  3. 90% fail

    Many packages will fail to import.