Skip to content
Latchkey

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/common

Common 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

OptionDoes
-e, --editable PATHInstall the project in editable mode
--no-build-isolationBuild without an isolated env
--config-settings KEY=VALPass settings to the build backend

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →