python install_error ai_generated true

错误:子进程以错误退出 × python setup.py egg_info 未成功运行。 │ 退出码:1

error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1

ID: python/pip-error-subprocess-exited-with-error

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

版本兼容性

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

根因分析

包的 setup.py 在元数据生成期间失败,通常由于缺少构建依赖、Python 版本不兼容或包损坏。

English

The package's setup.py failed during metadata generation, often due to missing build dependencies, incompatible Python version, or a broken package.

generic

解决方案

  1. 85% 成功率
    Install build dependencies first: `pip install wheel setuptools cython numpy` then retry.
  2. 80% 成功率
    Check the full error log above the summary; often a missing C library. Install system packages (e.g., `apt-get install libpq-dev`).

无效尝试

常见但无效的做法:

  1. 70% 失败

    Upgrading pip does not resolve missing build dependencies or package bugs.

  2. 60% 失败

    May fail because build deps are missing in the current environment.