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

- **ID:** `python/pip-invalid-requirement-no-such-file`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A requirements file includes a line that looks like a path but the file is missing, or -r/-c was omitted so pip treats a filename as a package name.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Use -r for nested requirements files:
  -r base.txt
  -r dev.txt
And check paths are relative to the including file, not the CWD.
   ```
2. **** (90% success)
   ```
   Verify each referenced file exists:
  while read -r line; do [[ $line == -r* ]] && f=${line#-r } && [ -f "$f" ] || echo "missing: $f"; done < requirements.txt
   ```

## Dead Ends

- **** — Upgrade does not change how pip parses the line; the missing file still fails. (95% fail)
- **** — If the path is relative and the CWD is different, renaming does not help; the resolution context is the issue. (70% fail)
