python install_error ai_generated true

错误:无效的命令 'egg_info'

error: invalid command 'egg_info'

ID: python/pip-egg-info-missing-requires

其他格式: JSON · Markdown 中文 · English
80%修复率
85%置信度
0证据数
2024-03-15首次发现

版本兼容性

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

根因分析

setuptools 未安装或版本过旧,导致构建包时 'egg_info' 命令不可用。

English

The setuptools package is not installed or is outdated, causing the 'egg_info' command to be unavailable during package build.

generic

解决方案

  1. 95% 成功率 Install or upgrade setuptools explicitly
    pip install --upgrade setuptools
  2. 80% 成功率 Use python -m ensurepip to bootstrap
    python -m ensurepip --upgrade

无效尝试

常见但无效的做法:

  1. Reinstalling pip using 'pip install --upgrade pip' 60% 失败

    Pip upgrade does not address missing setuptools.

  2. Manually creating an egg-info directory 80% 失败

    The directory structure is incomplete and doesn't fix the underlying command absence.