# ERROR: Invalid requirement: 'package==1.0 ; extra == "test"' - Expected end of string after extra specifier

- **ID:** `pip/requirements-file-syntax-error-extra`
- **Domain:** pip
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 92%

## Root Cause

The extras syntax in requirements.txt is malformed: pip expects the extras condition to be a simple marker expression without quoting the extra name, or the extra name must match a valid PEP 508 marker.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 19.0+ | active | — | — |
| Python 3.6-3.12 | active | — | — |

## Workarounds

1. **Use the correct PEP 508 marker syntax: package==1.0; extra == "test" (no space before semicolon, extra value in double quotes). Example:
package==1.0; extra == "test"** (95% success)
   ```
   Use the correct PEP 508 marker syntax: package==1.0; extra == "test" (no space before semicolon, extra value in double quotes). Example:
package==1.0; extra == "test"
   ```
2. **Use a separate requirements file for extras: create requirements-test.txt with just package==1.0 and install with pip install -r requirements-test.txt** (80% success)
   ```
   Use a separate requirements file for extras: create requirements-test.txt with just package==1.0 and install with pip install -r requirements-test.txt
   ```

## Dead Ends

- **** — The quotes are interpreted as part of the package name or marker, causing a different parse error. (90% fail)
- **** — Pip expects the marker value to be a string literal in quotes, e.g., extra == "test", not an unquoted identifier. (75% fail)
- **** — Pip does not support comma-separated extras in requirements.txt; it's invalid syntax. (85% fail)
