python
install_error
ai_generated
true
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
ID: python/setuptools-deprecated-use-of-setup-py
80%Fix Rate
90%Confidence
0Evidence
2024-03-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
The user invoked `python setup.py install` (or a tool that does) instead of using pip/build. Modern setuptools warns and will eventually remove this path.
generic中文
用户调用了 `python setup.py install`(或调用它的工具),而不是使用 pip/build。现代 setuptools 会告警,并最终移除该路径。
Workarounds
-
95% success
Replace `python setup.py install` with: python -m pip install . For editable installs: python -m pip install -e . For building distributions: python -m build
-
85% success
If you maintain the package, migrate metadata from setup.py to pyproject.toml [project] table and keep setup.py only as a shim.
Dead Ends
Common approaches that don't work:
-
70% fail
Hides the symptom but the legacy path is still used and will break in future setuptools releases.
-
85% fail
Downgrading setuptools breaks other packages that require modern setuptools for PEP 517/518 builds.