python install_error ai_generated true

KeyError: 'egg_info'

ID: python/setuptools-command-not-found-egg-info

其他格式: JSON · Markdown 中文 · English
80%修复率
84%置信度
0证据数
2025-02-14首次发现

版本兼容性

版本状态引入弃用备注
3.7 active — — —
3.8 active — — —
3.9 active — — —
3.10 active — — —

根因分析

setuptools 找不到 'egg_info' 命令,通常是因为包的 setup.py 格式错误或 setuptools 未正确安装。在使用最小化 Python 安装时可能发生。

English

setuptools cannot find the 'egg_info' command, typically because the package's setup.py is malformed or setuptools is not properly installed. This can occur when using a minimal Python installation.

generic

解决方案

  1. 90% 成功率
    Ensure setuptools is installed and up to date: pip install --upgrade setuptools.
  2. 95% 成功率
    Use a virtual environment with a full Python installation: python -m venv venv && source venv/bin/activate && pip install setuptools.

无效尝试

常见但无效的做法:

  1. 85% 失败

    If egg_info is missing, develop will also fail with the same error.

  2. 80% 失败

    Reinstalling doesn't fix setuptools installation issues.