# ERROR: Invalid requirement: 'requests==2.31.0'  Hint: = is not a valid operator. Did you mean == ?

- **ID:** `python/pip-invalid-requirement-parsing-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The requirements file or command line argument contains a malformed version specifier, most commonly a single '=' instead of '==', or a stray comma/space inside the version constraint that the packaging parser rejects.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (98% success)
   ```
   Replace single '=' with '==' and remove spaces around specifiers:
# bad
requests = 2.31.0
# good
requests==2.31.0
# or use a range
requests>=2.28,<3
   ```
2. **** (95% success)
   ```
   Shell metacharacters like '>' and '<' must be quoted:
pip install 'requests>=2.28,<3'
   ```

## Dead Ends

- **** — The parser is behaving correctly; the requirement string is genuinely invalid regardless of pip version. (90% fail)
- **** — The error is in the requirement text, not the environment, so a fresh venv reproduces it identically. (85% fail)
- **** — --no-deps only skips dependency resolution, not parsing of the top-level requirement. (80% fail)
