We ❤️ Open Source

A community education resource

3 min read

Comparing uv and pip for faster Python package management

One command, blazing speed, and less hassle managing Python dependencies.

Like most developers, I am always on the lookout for open source tools that can boost my productivity. Between all the Python environment and dependency tools, pip won out for me due to its simplicity and self-contained nature. I like that I can delete the .venv directory and know I don’t have a bunch or orphaned hidden files laying around.

At first my brother-in-law mentioned uv and he stays up-to-date on all sorts of tech. And then Matt Harrison of MetaSnake mentioned uv. These are two people I listen to when they make a suggestion. Checking out uv stayed on my mental “to do” list way too long. When I finally investigated and saw uv’s Github was very active and has 50K+ stars I knew astral.sh must be on to something. A quick peek at their web page and these two bullets caught my eye:

  • 🚀 A single tool to replace pip and more
  • ⚡ 10–100x faster than pip
uv package manager intro
uv replaces; and is 10–100x faster than pip

I like things that go fast. And I like testing how much faster they are. So I decided to test out uv with a set of arduous libraries that include PyTorch, pyarrow, jupyterlab and a few others that take more than a minute.

uv package manager comparison
uv was 2 minutes faster

Installing uv is a single command in Linux/*nix:

uv package manager install
Installing uv

I love coding in Python but two annoyances are managing dependencies and managing environments. For Python, you have multiple, overlapping technologies like pip, conda, venv, pyenv, pipenv, poetry, hatch and the files they create like requirements.txt and pyproject.toml. Or maybe you use Docker and create docker files and manage all the giant image files Docker creates.

All of this takes away from the enjoyment of actual coding. uv assuages some the complexities of dependency and environment setup. Removing even just a bit of these annoyances makes Python that much more enjoyable to code in.

Here is the full set of commands mentioned:

curl -LsSf http://astral.sh/uv/install.sh | sh

uv init killer-app
cd killer-app
uv add torch pandas polars tensorflow jupyterlab numpy scikit-learn xgboost

Cheers and happy coding.

More from We Love Open Source

This article is adapted from “uv VS pip — Faster Python Package Manager” by William Hill, and is republished with permission from the author.

About the Author

AI Developer Advocate @ NVIDIA | Duke MBA

Read William Hill's Full Bio

The opinions expressed on this website are those of each author, not of the author's employer or All Things Open/We Love Open Source.

Want to contribute your open source content?

Contribute to We ❤️ Open Source

Help educate our community by contributing a blog post, tutorial, or how-to.

This year we're hosting two world-class events!

Check out the AllThingsOpen.ai summary and join us for All Things Open 2025, October 12-14.

Open Source Meetups

We host some of the most active open source meetups in the U.S. Get more info and RSVP to an upcoming event.