A uv virtual environment has no pip, so install into it with uv pip
PitfallVerified 5 Nov 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
After a C++ change, pytest still loads the old compiled extension. The install step did not update the package.
Cause#
The project venv has no pip module. python -m pip install -e cannot run there. The old build stays in use.
Fix#
Run uv pip install -e ".[dev]" in the project root. Then run pytest again.
Evidence#
dftracer-utils, 2026-11. After uv pip install the run gave 2177 passed and 52 skipped. Before it, the suite used the old extension.
Also found by searching
- pytest runs the old compiled extension after a C++ change
- python -m pip not found in a uv virtual environment
- uv venv has no pip
- how do I reinstall an editable package into a uv virtual environment