# TypeError: 'str' object is not iterable
  in setup(install_requires='requests')

- **ID:** `python/setuptools-install-requires-string-not-list`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

setup() passes a string instead of a list to install_requires (or extras_require). setuptools iterates the value character-by-character and fails or installs nonsense.

## Version Compatibility

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

## Workarounds

1. **** (98% success)
   ```
   setup(
    name='mypkg',
    install_requires=['requests>=2.31', 'click>=8'],
)
   ```
2. **** (90% success)
   ```
   from pathlib import Path
reqs = [l.strip() for l in Path('requirements.txt').read_text().splitlines() if l.strip() and not l.startswith('#')]
setup(install_requires=reqs)
   ```

## Dead Ends

- **** — The bug is in your setup.py, not setuptools. (90% fail)
- **** — Still a string; setuptools still iterates characters. (95% fail)
- **** — Doesn't change the type mismatch in setup(). (85% fail)
