# DeprecationWarning：`setup.py develop` 已弃用，请改用 `pip install -e .`。
错误：无效命令 'develop'

- **ID:** `python/pip-legacy-setup-py-develop-invocation`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

setuptools 在 v64 中移除了 `develop` 命令。在现代 setuptools 上运行 `python setup.py develop` 会失败，因为命令类已不存在。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| setuptools>=64 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   Use pip's editable install instead:

pip install -e .

This uses PEP 660 editable wheels and works with modern setuptools/hatchling/flit.
   ```
2. **** (70% 成功率)
   ```
   For legacy projects that must run setup.py directly, invoke build_editable via the backend:

python -m build --wheel --no-isolation
pip install dist/mypackage-*.whl
# or with the PEP 660 hook:
python -c "from setuptools import build_meta; build_meta.build_editable('/tmp/out')"
   ```

## 无效尝试

- **** — Downgrading setuptools globally breaks other packages that require newer setuptools features and is not a sustainable fix. (70% 失败率)
- **** — The --user flag does not resurrect the removed command; the error is the same. (95% 失败率)
