pip install -e: Editable Installs Explained
Install your own project so code edits take effect without reinstalling.
pip install -e installs a local project in "editable" (development) mode, linking the source so changes are picked up immediately. CI uses it to install the package under test.
What it does
Installs a project from a local directory in editable mode. Imports resolve to your working tree, so edits take effect without reinstalling. Requires a build backend declared in pyproject.toml or a setup.py/setup.cfg.
Common usage
Terminal
pip install -e .
pip install -e ".[dev]"
pip install -e ./libs/commonCommon CI error: no build backend
On a project with no pyproject.toml and no setup.py, an editable install fails because pip has nothing to build. Add a minimal pyproject.toml declaring a build backend.
pyproject.toml
# Failure:
# ERROR: file:///app does not appear to be a Python
# project: neither 'setup.py' nor 'pyproject.toml' found.
# Fix: minimal pyproject.toml
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"Options
| Option | Does |
|---|---|
| -e, --editable PATH | Install the project in editable mode |
| --no-build-isolation | Build without an isolated env |
| --config-settings KEY=VAL | Pass settings to the build backend |
Related guides
pip install: Usage, Options & Common CI ErrorsHow pip install works - installing packages, version specifiers, and the options you reach for, plus the CI f…
python -m build: Build Wheels and SdistsHow python -m build creates an sdist and wheel in an isolated environment, what it needs in pyproject.toml, a…
pip "No matching distribution found for X" in CIFix pip "ERROR: No matching distribution found for X" in CI - pip reached an index but found no release match…