python
config_error
ai_generated
true
DEPRECATION:来自 file:///path 的 mypkg==0.1 的传统可编辑安装(setup.py develop)已被弃用。pip 25.0 将强制执行此行为更改。可能的替代方案是添加 pyproject.toml 或启用 --use-pep517
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%修复率
88%置信度
0证据数
2024-08-11首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
在没有 pyproject.toml 的项目上运行 pip install -e . 会回退到传统的 setup.py develop 路径,该路径计划被移除。
English
pip install -e . on a project without pyproject.toml falls back to the legacy setup.py develop path, which is slated for removal.
解决方案
-
95% 成功率
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% 成功率
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 .
无效尝试
常见但无效的做法:
-
80% 失败
Forces the deprecated path and will eventually be removed; also breaks with modern build backends.
-
90% 失败
pip 25.0+ enforces the change and the install will fail outright.