# ERROR: Invalid requirement: '-e git+https://github.com/org/repo.git@main#egg=foo' (from line 3 of requirements.txt)
Hint: It looks like a path. File 'requirements.txt' does not exist.

- **ID:** `python/pip-requirement-parse-invalid-editable`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pip parsed a requirement line incorrectly, often due to a stray space after -e, a BOM/encoding issue, or the line being read as an argument rather than a requirement.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8+ | active | — | — |

## Workarounds

1. **** (92% success)
   ```
   # requirements.txt
-e git+https://github.com/org/repo.git@main#egg=foo
# ensure UTF-8 without BOM; one requirement per line
   ```
2. **** (88% success)
   ```
   python -c "import sys; open('requirements.txt', encoding='utf-8-sig').read()"
# convert BOM:
sed -i '1s/^\xEF\xBB\xBF//' requirements.txt
pip install -r requirements.txt
   ```

## Dead Ends

- **** — Loses editable mode; changes how the package resolves imports and breaks local development workflow. (70% fail)
- **** — pip does not strip shell-style quotes from requirements lines; the quoted string becomes an invalid requirement. (85% fail)
