logoalt Hacker News

KaiserProlast Thursday at 9:28 PM4 repliesview on HN

Ok, what am I missing, I've used python for many many years. What does UV give us over pip + venv + pyenv?

(I'm not doing this to be a dick, I genuinely want to know what the use case is)


Replies

ghshephardlast Thursday at 11:37 PM

I've used python for roughly 15 years, and 10 of those years I was paid to primarily write and maintain projects written in Python.

Things got bearable with virtualenv/virtualenv wrappers, but it was never what I would call great. Pip was always painful, and slow. I never looked forward to using them - and every time I worked on a new system - the amount of finaggling I had to do to avoid problems, and the amount of time I spent supporting other people who had problems was significant.

The day I first used uv (about is as memorable to me as the the day I first started using python (roughly 2004) - everything changed.

I've used uv pretty much every single day since then and the joy has never left. Every operation is twitch fast. There has never once been any issues. Combined with direnv - I can create projects/venvs on the fly so quickly I don't even bother using it's various affordances to run projects without a venv.

To put it succinctly - uv gives me two things.

One - zero messing around with virtualenvwrappers and friends. For whatever reason, I've never once run into an error like "virtualenvwrapper.sh: There was a problem running the initialization hooks."

Two - fast. It may be the fastest software I've ever used. Everything is instant - so you never experience any type of cognitive distraction when creating a python project and diving into anything - you think it - and it's done. I genuinely look forward to uv pip install - even when it's not already in cache - the parallel download is epically fast - always a joy.

show 1 reply
andyferrislast Thursday at 9:55 PM

Everything “just works” and is fast - and that’s basically it.

You can run a script with a one liner and it will automatically get you the same python and venv and everything as whoever distributed the python code, in milliseconds if the packages are already cached on your local computer.

Very easy to get going without even knowing what a venv or pypi or anything is.

If you are already an expert you get “faster simpler tooling” and if you are a complete beginner it’s “easy peasy lemon squeezy”.

kortexyesterday at 1:45 AM

for one, it's one tool, that does the job of all three.

it just works. i'm not sure how else to describe it other than less faffing about. it just does the right thing, every time. there's a tiny learning curve (mostly unlearning bad or redundant habits), but once you know how to wield it, it's a one stop shop.

and as mentioned, it's crazy fast.

Eridruslast Thursday at 10:05 PM

It's not horrifically slow.