python install_error ai_generated true

ERROR: File "setup.py" not found. Cannot install editable mode.

ID: python/pip-install-editable-failed-no-setup-py

Also available as: JSON · Markdown · 中文
80%Fix Rate
87%Confidence
0Evidence
2024-05-28First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.8 active — — —
3.9 active — — —
3.10 active — — —
3.11 active — — —
3.12 active — — —

Root Cause

The package directory does not contain a setup.py, and pip's editable install requires it (unless using PEP 660 with pyproject.toml).

generic

中文

包目录不包含 setup.py,而 pip 的可编辑安装需要它(除非使用带有 pyproject.toml 的 PEP 660)。

Workarounds

  1. 90% success
    Ensure the package has a pyproject.toml with build-system and use `pip install -e .` with pip>=21.3.
  2. 85% success
    If the project uses setup.cfg, add a minimal setup.py: `from setuptools import setup; setup()`.

Dead Ends

Common approaches that don't work:

  1. 70% fail

    May not provide correct metadata; installation may fail or be incomplete.

  2. 90% fail

    Does not create setup.py.