Getting Started with uv

You know that feeling when you hear about a tool for the first time, and people keep saying, “You should really try this!" But for some reason, you just… don’t? That was me with uv.

I had heard whispers about it—a fast, efficient package manager for Python dependencies. Some said it was a better alternative to poetry, others praised its virtual environment capabilities. But I never bothered.

Until now.

I finally decided to try uv for an upcoming project—my first proper Python package. It’s funny how long I waited to build something with the promise of being actually useful. But here we are.

And let me tell you: uv is fast.

Here’s how I got started.

Installing uv on Windows

I’m on Windows, so installation meant running this command in PowerShell:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Once installed, I double-checked just to be sure:

powershell -c "irm https://astral.sh/uv/install.ps1 | more"

Now, with uv ready to go, it was time to set up my project.

Creating a Virtual Environment

In Python, managing dependencies in isolated environments is crucial. Typically, I’d use venv or virtualenv, but uv does something cool—it automatically activates the virtual environment when you’re inside the project folder.

But first, you need to create it by:

uv venv

No more manually running source .venv/bin/activate or .\.venv\Scripts\activate on Windows. It just works.

Still, out of habit, I tried activating it manually:

.\.venv\Scripts\activate

Old habits die hard.

Setting Up for Package Development

Once inside my environment, the next step was to upgrade some essential tools:

uv pip install --upgrade pip setuptools wheel

Then, I installed cookiecutter, a fantastic tool for bootstrapping Python packages without reinventing the wheel:

pip install -U cookiecutter

But here’s the kicker—there’s a dedicated Python package template for cookiecutter. Running the following command set up a clean project structure for me:

cookiecutter https://github.com/audreyfeldroy/cookiecutter-pypackage.git

This prompts a few questions about the package name, author, license, etc., and within seconds, boom—a fully structured Python package appeared.

Installing Dependencies with uv

For this project, I needed networkx, pandas, and rdflib. With uv, installing them was as simple as:

uv pip install networkx pandas rdflib

What impressed me was how fast uv handled the installations. Even better—it automatically updated the pyproject.toml file with these dependencies. I think pip also does this, so not much to say on this regards.

Apparently, I could have also done this using:

uv add networkx pandas

I’ll need to experiment with this more, but the idea of having a package manager that seamlessly updates dependencies without extra steps? I like that.

Checking Installed Packages

To see the list of installed packages and their versions, uv provides a simple command:

uv python list

Fast, clean, and no clutter—just how I like it.

Installing My Own Package

After writing some initial code, I wanted to install my package locally to test it:

uv pip install -e .

This allowed me to use my package within my environment without needing to publish it.


I only just started using uv, but I’m already impressed by how smooth and efficient it is. The speed, the automatic environment activation, and the pyproject.toml management—it’s refreshing.

I plan to dive deeper into uv and see how it holds up in a full development workflow. There’s always more to learn, and I’m sure I’ll have some thoughts (and rants) along the way.

Until then, happy coding. 🚀