python
config_error
ai_generated
true
DEPRECATION: Legacy editable install of mypkg==0.1 from file:///path (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517
ID: python/pip-legacy-setup-py-develop-install
80%Fix Rate
88%Confidence
0Evidence
2024-08-11First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
pip install -e . on a project without pyproject.toml falls back to the legacy setup.py develop path, which is slated for removal.
generic中文
在没有 pyproject.toml 的项目上运行 pip install -e . 会回退到传统的 setup.py develop 路径,该路径计划被移除。
Workarounds
-
95% success
cat > pyproject.toml <<'TOML' [build-system] requires = ["setuptools>=68", "wheel"] build-backend = "setuptools.build_meta" [project] name = "mypkg" version = "0.1.0" TOML pip install -e .
-
90% success
pip install hatchling cat > pyproject.toml <<'TOML' [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "mypkg" version = "0.1.0" TOML pip install -e .
Dead Ends
Common approaches that don't work:
-
80% fail
Forces the deprecated path and will eventually be removed; also breaks with modern build backends.
-
90% fail
pip 25.0+ enforces the change and the install will fail outright.