Back to results for “Modules & Packaging”
Python › Modules & Packaging

What does 'editable install' (pip install -e .) mean, and why is it useful during development?

Intermediate

Answer

An editable install links the installed package directly to your source directory (via a path configuration) instead of copying files into site-packages, so changes to your source code take effect immediately without reinstalling. This is standard practice when developing a package that other local code or tests need to import as if it were properly installed.
# From the project root containing pyproject.toml
pip install -e .

# Now edits to mypackage/*.py are immediately visible
# to any code that does `import mypackage`
Real-world example A developer working on a library alongside a sample application installs the library with `pip install -e .` so changes to the library's source are picked up instantly when running the sample app, without repackaging.

Common follow-ups: How does editable install differ from adding the source directory to PYTHONPATH manually?;What changed with PEP 660's editable install standard?