Skip to content

What Is an Editable Install?

An editable install (also called a “development install”) installs a Python package so that changes to the source code are immediately reflected in the environment without requiring reinstallation. Both pip and uv support editable installs via the -e flag. Use them during active development; do not use them in production environments.

Run an editable install

From the project root:

pip install -e .

With uv’s pip-compatible interface:

uv pip install -e .

With a uv project, uv sync handles this automatically for the project’s own package when [build-system] is present in pyproject.toml.

How the .pth file links source to site-packages

An editable install places a .pth file in the Python environment’s site-packages directory instead of copying the package files there. That .pth file points Python’s import system to the development directory containing the source code, so your IDE finds the actual source files rather than installed copies.

Compiled extensions are not automatically rebuilt when you change their source code. Recompile them manually after modifying C extension code.

Watch for these edge cases

  • Moving or renaming the source directory breaks the .pth pointer silently; reinstall with -e after any such move.
  • Data files and package resources may resolve to source-tree paths rather than installed paths. Verify the behavior with a real wheel install before publishing.

How PEP 660 standardized editable installs

PEP 660 introduced a standard hook API that any PEP 517-compliant build backend can implement to support editable installs. Before PEP 660, editable installs were only available through setuptoolssetup.py develop command. The PEP decoupled this workflow from setuptools, allowing backends like Hatch and Flit to support editable installs through a common interface.

Last updated on