# ERROR: Invalid requirement: 'foo bar==1.0' (from line 3 of requirements.txt)
Hint: It looks like a path. File 'foo bar==1.0' does not exist.

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

## Root Cause

The requirements line contains an unquoted space or stray text, so pip cannot parse it as a requirement and falls back to interpreting it as a local path.

## Version Compatibility

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

## Workarounds

1. **** (94% success)
   ```
   # requirements.txt: foo==1.0
python -c "from packaging.requirements import Requirement; [Requirement(l.strip()) for l in open('requirements.txt') if l.strip()]"
pip install -r requirements.txt
   ```
2. **** (90% success)
   ```
   foo==1.0; python_version >= '3.9'
   ```

## Dead Ends

- **** — Parsing behavior is stable; the malformed line still fails. (90% fail)
- **** — Adding a find-links path does not make the malformed requirement valid. (85% fail)
