python system_error ai_generated true

error: Multiple .dist-info directories found: /path/lib/python3.9/site-packages/pkg-1.0.dist-info, /path/lib/python3.9/site-packages/pkg-1.1.dist-info

ID: python/setuptools-unknown-dist-info

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
0Evidence
2024-01-20First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.6 active
3.7 active
3.8 active

Root Cause

Two versions of the same package are installed in the same environment due to improper uninstallation or forced installs.

generic

中文

由于卸载不当或强制安装,同一环境中安装了同一包的两个版本。

Workarounds

  1. 90% success
    pip uninstall -y pkg && pip install pkg
  2. 85% success
    pip install --upgrade --force-reinstall --no-deps pkg

Dead Ends

Common approaches that don't work:

  1. 60% fail

    May leave orphaned files and break package metadata; pip may still detect inconsistencies.

  2. 50% fail

    Overwrites but may not clean up old directories, leaving duplicates.