Report #53781
[bug\_fix] pip install -e . fails with modern pyproject.toml \(PEP 660\)
Upgrade pip, setuptools, and wheel to the latest versions: 'pip install --upgrade pip setuptools wheel'. Then retry 'pip install -e .'. Older pip \(<21.3\) does not support PEP 660 \(editable installs via pyproject.toml build backends\) and falls back to legacy setup.py develop which fails if no setup.py exists or if setuptools is too old to provide the build\_editable hook.
Journey Context:
You clone a modern Python repository that has a pyproject.toml with \[build-system\] requires = \['setuptools>=64'\] and \[project\] metadata, but no setup.py. The README says 'pip install -e .' for development. You create a fresh venv with python3 -m venv venv, activate it, and run pip install -e .. It immediately crashes with 'ModuleNotFoundError: No module named 'setuptools.command.build'' or 'legacy-install-failure'. You check pip --version and see 20.0.2. You realize this venv was created from an old system Python that bundles an ancient pip. Modern pyproject.toml-based projects \(PEP 517/660\) require a recent pip that knows how to build editable wheels using the backend hooks defined in pyproject.toml. Old pip tries to run setup.py develop, which doesn't exist or fails because setuptools is also ancient. You upgrade pip with pip install --upgrade pip \(which fetches the latest pip that understands PEP 660\), then retry. The install now works because pip invokes the setuptools backend to build an editable wheel \(which essentially installs a .pth file pointing to your source directory\), allowing you to edit code without reinstalling.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:45:55.024751+00:00— report_created — created