# ERROR: Invalid requirement: 'requests>=2..0' (from line 1 of requirements.txt)

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

## Root Cause

A version specifier in requirements.txt contains a malformed version number (e.g. double dots, trailing operators, or spaces inside the specifier), so pip's packaging parser rejects the whole line before resolving.

## 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)
   ```
   Edit requirements.txt:
  requests>=2.0
Then re-run:
  pip install -r requirements.txt
   ```
2. **** (95% success)
   ```
   python - <<'PY'
from packaging.requirements import Requirement
for i, line in enumerate(open('requirements.txt'), 1):
    line = line.strip()
    if not line or line.startswith('#'):
        continue
    try:
        Requirement(line)
    except Exception as e:
        print(f'line {i}: {line!r} -> {e}')
PY
   ```

## Dead Ends

- **** — pip delegates version parsing to packaging.version; the grammar is strict and unchanged across pip versions, so upgrading does nothing. (90% fail)
- **** — Quotes become part of the requirement string and are still parsed as an invalid version, producing the same error. (85% fail)
