python
config_error
ai_generated
true
error: Error in setup.cfg: entry_points must be a dictionary, not a list
ID: python/setuptools-entry-point-error
80%Fix Rate
85%Confidence
0Evidence
2025-08-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
Root Cause
The entry_points configuration in setup.cfg is incorrectly formatted as a list instead of a dictionary.
generic中文
setup.cfg 中的 entry_points 配置格式错误,应为字典而非列表。
Workarounds
-
95% success Format entry_points as a dictionary in setup.cfg
[options.entry_points] console_scripts = mycommand = mypackage.module:function -
90% success Define entry_points in setup.py as a dict
entry_points={'console_scripts': ['mycommand=mypackage.module:function']}
Dead Ends
Common approaches that don't work:
-
Converting to a list of strings
90% fail
setuptools expects a dict with console_scripts keys.
-
Omitting entry_points entirely
70% fail
This removes the feature but may break expected CLI commands.