# ERROR: Invalid requirement: 'package[extra1,extra2]' (line 1 of requirements.txt). Hint: = is not a valid operator. Did you mean == ?

- **ID:** `pip/conflict-with-requirements-txt-extra`
- **Domain:** pip
- **Category:** config_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

A requirements.txt line uses a single equals sign (=) for version pinning after an extras specification, but pip requires double equals (==) for exact version constraints.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 22.0 | active | — | — |
| pip 23.1 | active | — | — |
| pip 24.0 | active | — | — |

## Workarounds

1. **Edit requirements.txt to use double equals: `package[extra1,extra2]==1.0`** (95% success)
   ```
   Edit requirements.txt to use double equals: `package[extra1,extra2]==1.0`
   ```
2. **If no version pin is needed, remove the version specifier: `package[extra1,extra2]`** (85% success)
   ```
   If no version pin is needed, remove the version specifier: `package[extra1,extra2]`
   ```
3. **Use `pip install -r requirements.txt --no-deps` to bypass the invalid line temporarily, then fix the file.** (70% success)
   ```
   Use `pip install -r requirements.txt --no-deps` to bypass the invalid line temporarily, then fix the file.
   ```

## Dead Ends

- **Remove the extras brackets entirely and reinstall without extras.** — The user may need the extras for functionality; removing them is a workaround but not a fix. (60% fail)
- **Change the operator to >= instead of ==.** — The error is about the single equals sign, not the operator type; >= also requires double equals. (90% fail)
- **Ignore the error and use `pip install package[extra1,extra2]==1.0` directly on CLI.** — The CLI command works, but the requirements.txt remains broken for future installs or CI. (70% fail)
