Skip to content
Latchkey

uv venv: Create a Virtual Environment Fast

Create a venv in a fraction of the time.

uv venv creates a virtual environment much faster than python -m venv and can fetch a managed Python version on demand. It is the usual first step in a uv-based CI job.

What it does

Creates a virtual environment (default .venv) and can target or even download a specific Python version with --python. Subsequent uv pip commands install into it.

Common usage

Terminal
uv venv
uv venv --python 3.11
uv venv myenv
. .venv/bin/activate

Common CI use: pin the Python version

Pass --python to build the environment on an exact version; uv can download a managed interpreter if it is not present, removing a separate setup-python step.

Terminal
uv venv --python 3.12
uv pip install -r requirements.txt

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →