# pytest.PytestConfigError: Unknown plugin: 'pytest-cov'

- **ID:** `python/pytest-missing-plugin`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The pytest configuration (pytest.ini, pyproject.toml, or conftest.py) references a plugin that is not installed in the current Python environment, causing pytest to fail on startup.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.11 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Install the missing plugin using pip: pip install pytest-cov, then re-run pytest.
   ```
2. **** (90% success)
   ```
   If the plugin is not needed, remove its reference from the configuration file (e.g., delete 'pytest-cov' from addopts or plugins list).
   ```

## Dead Ends

- **** — Adding the plugin name to conftest.py's pytest_plugins list without installing it first still raises the same error. (80% fail)
- **** — Ignoring the error and running tests with -p no:plugin may suppress the error but disables the plugin's functionality. (50% fail)
