# ImportError: No module named 'uvicorn'

- **ID:** `python/starlette-importerror-uvicorn`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Uvicorn ASGI server is not installed in the current Python environment.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Install uvicorn using pip** (95% success)
   ```
   pip install uvicorn
# Or for production: pip install 'uvicorn[standard]'
   ```
2. **Activate correct virtual environment** (90% success)
   ```
   source venv/bin/activate  # Linux/Mac
venv\Scripts\activate  # Windows
pip install uvicorn
   ```

## Dead Ends

- **Installing in wrong virtual environment** — Package installed but not in active env. (80% fail)
- **Using pip without --user flag in system Python** — May not have permissions; use virtualenv. (60% fail)
