# ERROR: Cannot uninstall requirement '<package>', not installed. It is only installed as an editable package.

- **ID:** `pip/req-uninstall-editables-only`
- **Domain:** pip
- **Category:** install_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

Pip refuses to uninstall a package that was installed with `-e` (editable) mode when the user attempts to uninstall it with a non-editable specifier or a version mismatch.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 21.3 | active | — | — |
| pip 22.0.4 | active | — | — |
| pip 23.2 | active | — | — |

## Workarounds

1. **Reinstall the package in non-editable mode first, then uninstall: `pip install <package> --force-reinstall --no-deps` followed by `pip uninstall <package> -y`** (85% success)
   ```
   Reinstall the package in non-editable mode first, then uninstall: `pip install <package> --force-reinstall --no-deps` followed by `pip uninstall <package> -y`
   ```
2. **Use `pip uninstall <package> -y` with the exact editable path from `pip show <package>` (e.g., `pip uninstall -e /path/to/project`). Example: `pip uninstall -e /home/user/myproject`** (90% success)
   ```
   Use `pip uninstall <package> -y` with the exact editable path from `pip show <package>` (e.g., `pip uninstall -e /path/to/project`). Example: `pip uninstall -e /home/user/myproject`
   ```

## Dead Ends

- **** — The flag only affects dependency resolution, not the uninstall target itself; pip still checks if the package is installed as editable. (95% fail)
- **** — The editable install is a symlink or .pth file, not a full copy; deleting the directory leaves the .pth file, causing pip to still see the package as installed. (80% fail)
