# ERROR: Invalid requirement: 'requests ==2.31.0'

- **ID:** `python/pip-invalid-requirement-double-equals-space`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Pip's requirement parser treats a space between the package name and the version specifier as a separate token, so 'requests ==2.31.0' is parsed as two invalid requirements.

## Version Compatibility

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

## Workarounds

1. **** (99% success)
   ```
   Remove the space: pip install requests==2.31.0
   ```
2. **** (99% success)
   ```
   Use the PEP 508 form with no space: pip install 'requests==2.31.0'
   ```
3. **** (98% success)
   ```
   Put it in requirements.txt with no space: echo 'requests==2.31.0' > requirements.txt && pip install -r requirements.txt
   ```

## Dead Ends

- **** — Quoting preserves the space; pip still sees the invalid token split and raises the same Invalid requirement error. (85% fail)
- **** — The shell passes a literal backslash-space to pip, which is not a valid requirement character and still fails parsing. (90% fail)
- **** — The syntax error is independent of the shell/terminal; the malformed requirement string is the cause. (95% fail)
