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/activateCommon 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.txtRelated guides
uv pip install: Fast, pip-Compatible InstallsHow uv pip install provides a fast, drop-in pip-compatible installer, the flags it shares with pip, and the m…
uv sync: Install Exactly What uv.lock PinsHow uv sync makes the environment match uv.lock exactly, the --frozen and --no-dev flags for CI, and the lock…
python -m venv: Create Virtual EnvironmentsHow python -m venv creates an isolated virtual environment, how to activate it on Linux and Windows runners,…