# distutils.errors.DistutilsOptionError: error in 'extras_require' option: 'foo' must be a string or list of strings containing valid project/version requirement specifiers; Invalid specifier: '>=1.0, <2.0, !=1.5'

- **ID:** `python/setuptools-extras-require-parse-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An extras_require entry uses a specifier set the installed packaging/setuptools cannot parse, often due to stray whitespace, a trailing comma, or a duplicate/conflicting operator.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Simplify the specifier to a valid PEP 440 set, e.g. `'>=1.0,<2.0,!=1.5'` (no spaces, no trailing comma).
   ```
2. **** (90% success)
   ```
   Validate with `python -c "from packaging.specifiers import SpecifierSet; SpecifierSet('>=1.0,<2.0')"`.
   ```

## Dead Ends

- **** — Whitespace is not the issue; the specifier set itself is malformed. (85% fail)
- **** — Shifts the same parse error to a different field. (75% fail)
