# fixture 'mocker' not found
available fixtures: cache, capfd, capsys, ...

- **ID:** `python/pytest-mock-not-installed`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The `mocker` fixture is provided by pytest-mock, which is not installed or not in the active environment.

## Version Compatibility

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

## Workarounds

1. **** (98% success)
   ```
   pip install pytest-mock
# or
poetry add --group dev pytest-mock
# or
uv add --dev pytest-mock
   ```
2. **** (90% success)
   ```
   from unittest import mock

def test_x():
    with mock.patch('myapp.views.requests.get') as m:
        m.return_value.json.return_value = {}
        myapp.views.fetch()
   ```

## Dead Ends

- **** — mock is a module, not a fixture; pytest tries to resolve it as a fixture and fails. (95% fail)
- **** — Returns the module, not a MagicMock controller; tests expecting `mocker.patch` fail with AttributeError. (90% fail)
- **** — pytest runs in the currently active env; installing elsewhere doesn't make the fixture available. (90% fail)
