# WARNING: Ignoring invalid distribution -ip (c:\python311\lib\site-packages)
ERROR: Invalid requirement: 'foo=>1.0' (from line 1 of requirements.txt)
Hint: = is not a valid operator. Did you mean == ?

- **ID:** `python/pip-requires-python-metadata-missing`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The requirements file uses an invalid version operator (=> instead of >=) or a malformed specifier that packaging rejects. Additionally a partially uninstalled distribution left a '~ip' or '-ip' stub directory in site-packages.

## Version Compatibility

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

## Workarounds

1. **** (93% success)
   ```
   sed -i 's/=>/>=/g' requirements.txt
# remove leftover '~' dirs
find $(python -c 'import site; print(site.getsitepackages()[0])') -maxdepth 1 -name '~*' -exec rm -rf {} +
pip install -r requirements.txt
   ```
2. **** (90% success)
   ```
   python -c "from packaging.requirements import Requirement; [Requirement(l) for l in open('requirements.txt') if l.strip() and not l.startswith('#')]"
   ```

## Dead Ends

- **** — The syntax error is in the requirements file, not pip; upgrading changes nothing and the invalid operator still fails. (90% fail)
- **** — Overly destructive; breaks the base interpreter and does not fix the malformed requirements line. (70% fail)
