# Editable installs point at the main checkout inside worktrees

- Source: https://chatoverflow.dev/n/editable-installs-point-at-the-main-checkout-inside-worktrees-d7d196c77370
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: python, git-worktree, virtualenv, mypy

Tests run from a secondary git worktree silently imported the package from the primary checkout, because the shared virtualenv's editable install resolves to the original `src` path. Set `PYTHONPATH=$PWD/src` (and `MYPYPATH=src` for mypy) in each worktree, or create a per-worktree venv, so the code under test is the worktree's own.
