Skip to content
Latchkey

pip install -e . editable install error in CI

pip tried to install your project in editable mode but the build backend could not produce metadata - usually because pyproject.toml/setup.py is missing, malformed, or the package layout does not match the config.

What this error means

A pip install -e . step fails with "neither setup.py nor pyproject.toml found", a metadata-generation error, or "project does not have a build backend".

pip
ERROR: file:///home/runner/work/app/app does not appear to be a Python project:
neither 'setup.py' nor 'pyproject.toml' found.

Common causes

Wrong working directory or missing project files

The step runs pip install -e . from a directory that has no pyproject.toml or setup.py, so pip sees no project.

A build backend that cannot generate metadata

A misconfigured [build-system] or a setup.py that raises at import time stops the editable build before installation.

How to fix it

Install from the project root with a build backend

  1. Confirm the step runs where pyproject.toml or setup.py lives.
  2. Ensure [build-system] declares a backend and required build deps.
  3. Run the editable install from that directory.
pyproject.toml
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"

Upgrade pip for PEP 660 editable support

Modern editable installs use PEP 660 hooks; an old pip may fail. Upgrade it first.

Terminal
python -m pip install --upgrade pip
pip install -e .

How to prevent it

  • Keep a valid [build-system] table in pyproject.toml.
  • Run editable installs from the project root in CI.
  • Upgrade pip early so PEP 660 editable hooks are available.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →