How to Install uvicorn in Python

v0.44.0 Web & HTTP Python >=3.10

The lightning-fast ASGI server.

Install pip install uvicorn

What is uvicorn?

The lightning-fast ASGI server.

Uvicorn is an ASGI web server implementation for Python.

Until recently Python has lacked a minimal low-level server/application interface for async frameworks. The [ASGI specification][asgi] fills this gap, and means we're now able to start building a common set of tooling usable across all async frameworks.

Uvicorn supports HTTP/1.1 and WebSockets.

Quick Start

Minimal example to get started with uvicorn:

import uvicorn

print(uvicorn.__version__)

Installation

pip (standard)

pip install uvicorn

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install uvicorn

pip3

pip3 install uvicorn

conda

conda install -c conda-forge uvicorn

Poetry

poetry add uvicorn

Dependencies

Installing uvicorn will also install these packages:

Verify the Installation

After installing, confirm the package is available:

python -c "import uvicorn; print(uvicorn.__version__)"

If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.

Installation Errors

Common errors when installing uvicorn with pip.

ModuleNotFoundError: No module named 'uvicorn'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install uvicorn. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'uvicorn' (installed but still failing)

Cause: pip installed the package into a different Python than the one running your script.

Fix: Use python -m pip install uvicorn to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'uvicorn'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show uvicorn and upgrade with pip install --upgrade uvicorn.

pip: command not found

Cause: pip is not in PATH or Python was not added to PATH during installation.

Fix: Try python -m pip install uvicorn. On macOS/Linux try pip3.

PermissionError: [Errno 13] Permission denied

Cause: No write access to the system Python package directory.

Fix: Use a virtual environment, or add --user: pip install --user uvicorn

SSL: CERTIFICATE_VERIFY_FAILED

Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.

Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org uvicorn

ConnectionError: Failed to establish a new connection

Cause: Server unreachable, URL invalid, or firewall/proxy blocking the connection.

Fix: Verify the URL and network access. Set HTTP_PROXY / HTTPS_PROXY env vars if behind a proxy.

SSLError: CERTIFICATE_VERIFY_FAILED

Cause: The remote server's SSL certificate cannot be verified.

Fix: Update CA certificates on your system. For testing only, disable SSL verification (never in production).

Recent Releases

VersionReleased
0.44.0 latest 2026-04-06
0.43.0 2026-04-03
0.42.0 2026-03-16
0.41.0 2026-02-16
0.39.0 2025-12-21

Full release history on PyPI →

Manage uvicorn

Upgrade to latest version

pip install --upgrade uvicorn

Install a specific version

pip install uvicorn==0.44.0

Uninstall

pip uninstall uvicorn

Check what is installed

pip show uvicorn

Last updated: 2026-04-11 • Data from PyPI