# 错误：setuptools.errors.InvalidConfigError：入口点 'console_scripts' 格式无效：'mycommand = mymodule:main:extra'

- **ID:** `python/setuptools-entry-point-invalid`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

入口点语法冒号过多；预期格式为 'name = module:function'。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## 解决方案

1. **Correct the entry point format** (95% 成功率)
   ```
   Change to 'mycommand = mymodule:main' (only one colon).
   ```
2. **Use a function that returns the callable** (85% 成功率)
   ```
   Define a function in mymodule that returns main, then use 'mycommand = mymodule:get_main'.
   ```

## 无效尝试

- **Adding more colons to match a pattern** — Increases syntax error. (90% 失败率)
- **Using a dot instead of colon** — Dot is not a valid separator for entry points. (80% 失败率)
