# async def functions are not natively supported.
You need to install a suitable plugin for your async framework, for example:
  - anyio
  - pytest-asyncio

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

## Root Cause

Pytest cannot run `async def` test functions without an async plugin. The test is collected but pytest refuses to execute it because the event loop is not managed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (98% success)
   ```
   Install the plugin and enable auto mode:

pip install pytest-asyncio

# pytest.ini
[pytest]
asyncio_mode = auto
   ```
2. **** (90% success)
   ```
   Use anyio instead:

pip install anyio

# test file
import pytest

@pytest.mark.anyio
async def test_thing():
    ...
   ```

## Dead Ends

- **** — The test function itself is still async, so pytest still rejects it during collection. (90% fail)
- **** — The setting is only read by pytest-asyncio; without the plugin installed the option is ignored and the error persists. (95% fail)
