# 错误：无法识别选项 --install-lib
用法：setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
或：setup.py --help [cmd1 cmd2 ...]
或：setup.py --help-commands
或：setup.py cmd --help

- **ID:** `python/setuptools-unknown-distribution-option`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

调用自定义 distutils/setuptools 命令时传入了它未在 user_options 中声明的选项，因此选项解析器拒绝该选项。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   In the Command subclass, add user_options = [('install-lib=', None, 'target directory')] and handle it in initialize_options/finalize_options.
   ```
2. **** (90% 成功率)
   ```
   Move the setting into setup.cfg under [install] install-lib = /path and run python setup.py install.
   ```

## 无效尝试

- **** — The command still does not declare the option; order does not matter. (90% 失败率)
- **** — Verbosity does not register unknown options. (95% 失败率)
- **** — Privilege is unrelated to option parsing. (95% 失败率)
