2025, Nov 18 09:00

Install uv Once, Then Run uv venv: A Simple Guide to Bootstrapping a Python Project the Right Way

Learn how to install uv (via pip, pipx, or installer) and fix the 'uv venv' not found error. Set up a clean Python project: install uv once, then create a venv.

Bootstrapping a fresh Python project and planning to use uv for package management can feel like a paradox at first glance: you want to run uv venv, but uv isn’t on your machine yet. Installing something globally may seem wrong if your goal is isolation. Let’s untangle the confusion and get to a clean, predictable setup.

Problem recap

You try to initialize a project environment using uv, but the tool isn’t installed system-wide, so the very first command is unavailable.

uv venv

What’s actually going on

This isn’t a chicken-and-egg situation. uv is written in Rust and doesn’t depend on Python or a virtual environment to exist in the first place. That means you don’t need any Python tooling to install uv. You can fetch it independently through several supported methods described in the official documentation: a standalone installer, pip, cargo, docker, or by downloading the binary directly. The details are covered here: https://docs.astral.sh/uv/getting-started/installation/.

If you prefer a simple approach and already have pip on your machine, installing uv as a user-level application is perfectly fine. A package manager can live outside a virtual environment without violating the principle of isolation for your project dependencies.

Minimal reproducible example of the issue

The initial attempt fails simply because the tool isn’t in your PATH yet, not because uv requires a virtual environment.

uv venv

Solution

Install uv first using one of the supported approaches. If pip is available, a straightforward option is to install it to your user site-packages, keeping it out of system-wide locations while making it available on your account.

pip install --user uv
uv venv

Alternatively, follow the official installer methods documented at https://docs.astral.sh/uv/getting-started/installation/. Those include a standalone installer, cargo, docker, or downloading a binary. The documentation also recommends using pipx for this class of tools, which many developers find convenient for global CLI utilities.

Why this matters

Understanding that uv is independent of Python avoids unnecessary bootstrapping anxiety. You don’t need to bend your environment model to fit a tool that doesn’t require Python to begin with. Install the tool once, then manage your project’s Python dependencies inside the virtual environment created by uv. This keeps the roles clear: uv as a system-level or user-level CLI, and your project’s libraries confined to the virtual environment.

Conclusion

There’s no paradox in setting up uv before your virtual environment. Install uv using a supported method—user-level with pip is a pragmatic option—then run uv venv to initialize your project. If you prefer a different installation path, the official guide at https://docs.astral.sh/uv/getting-started/installation/ outlines all supported choices. The key is simple: get uv onto your machine first, then let it handle your project isolation the right way.