# TypeError: entry_points() got an unexpected keyword argument 'console_scripts'

- **ID:** `python/setuptools-entry-points-error`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Incorrect use of entry_points parameter in setup.py; console_scripts should be a key in a dictionary, not a separate argument.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **Correctly structure entry_points as a dictionary** (95% success)
   ```
   `setup(..., entry_points={'console_scripts': ['mycmd=mymodule:main']})`
   ```
2. **Use pyproject.toml with [project.scripts] instead** (90% success)
   ```
   In pyproject.toml: `[project.scripts]
mycmd = "mymodule:main"`
   ```

## Dead Ends

- **Passing console_scripts as a list directly to setup()** — setup() expects entry_points as a dict; console_scripts is not a valid top-level parameter. (70% fail)
- **Removing entry_points entirely** — This removes the command-line scripts, which may be required for the package's functionality. (50% fail)
