pip "pip install -e ." Editable Build Errors in CI
An editable install (pip install -e .) runs the project’s build backend to wire up the package in place. When the backend, its config, or editable support is missing, that step fails before anything is importable.
What this error means
pip install -e . fails where a normal pip install . might also struggle - a missing [build-system], an old setuptools without PEP 660 editable support, or a build error specific to the editable hook. CI then cannot import the first-party package.
ERROR: Project file:///repo has a 'pyproject.toml' and its build backend
is missing the 'build_editable' hook. Since editable installable projects
require the editable hook ... cannot be installed in editable mode.Common causes
Build backend lacks PEP 660 editable support
An old setuptools (or a backend without build_editable) cannot perform a modern editable install, so pip refuses.
No package configured to install
The project does not declare any package (no [tool.setuptools] packages, no discoverable layout), so there is nothing for the editable build to wire up.
How to fix it
Upgrade the build tooling
Modern setuptools supports PEP 660 editable installs. Upgrade pip and setuptools first.
python -m pip install --upgrade pip setuptools wheel
pip install -e .Declare the package and backend
Ensure a build backend and discoverable package are configured.
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]How to prevent it
- Pin a setuptools recent enough for PEP 660 editable installs.
- Declare
[build-system]and a discoverable package layout. - Test
pip install -e .locally before relying on it in CI.