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. They are for active development; do not use them in production environments.

How Editable Installs Work

Under the hood, 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. Your IDE can find and interact with the actual source files.

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

Caveats

  • 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.

Learn More

Last updated on