Live data from Hacker News

Uv is the best thing to happen to the Python ecosystem in a decade

emily.space

341–350 of 1001 posts

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#341
I either want one universal tool that can manage this sort of thing across multiple languages (eg. devenv) or a native, built-in tool (eg. go's tooling). I don't see how this is any different from all the previous incarnations of Python's project/package management tools. The constant churning of 3rd party tooling for Python was one of the main reasons I mostly stopped using it for anything but smaller scripts.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#342

I gotta say, I feel pretty vindicated after hearing for years how Python’s tooling was just fine and you should just use virtualenv with pip and how JS must be worse, that when Python devs finally get a taste of npm/cargo/bundler in their ecosystem, they freaking love it. Because yes, npm has its issues but lock files and consistent installs are amazing

There is nothing I dread more within the general context of software development, broadly , than trying to run other people's Python projects. Nothing. It's shocking that it has been so bad for so long.

So many times I have come onto a library or tool that would fix my problem, and then realized “oh crap, it’s in Python, I don’t want to spend few hours building a brittle environment for it only for that env to break next time I need to use it” - and went to look for a worse solution in better language.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#344
post #260

> Instead of > > source .venv/bin/activate > python myscript.py > > you can just do > > > uv run myscript > This is by far the biggest turn off for me. The whole point of an environment manager is set the environment so that the commands I run work. They need to run natively how they are supposed to when the environment is set, not put through a translation layer. Side rant: yes I get triggered whenever someone tells…

> I get triggered whenever someone tells me "you can just" do this thing that is actually longer and worse than the original.

Apologies for triggering you in advance, but in case you or others find it useful, here’s how to do the equivalent env-activation commands with uv: https://news.ycombinator.com/item?id=44360892

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#345
post #21

I must be the odd man out but I am not a fan of uv. 1. It tries to do too many things. Please just do one thing and do it well. It's simultaneously trying to replace pip, pyenv, virtualenv, and ruff in one command. 2. You end up needing to use `uv pip` so it's not even a full replacement for pip. 3. It does not play well with Docker. 4. It adds more complexity. You end up needing to understand all of these new enviro…

It's funny, I feel like half the reason I use docker is for python projects.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#346

Earlier quoted context omitted.

Never underestimate cultural momentum I guess. NBA players shot long 2 pointers for decades before people realized 3 > 2. Doctors refused to wash their hands before doing procedures. There’s so many things that seem obvious in retrospect but took a long time to become accepted

[flagged]

People in Europe spents years with people dying due to heat stress before they discovered ACs....

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#347

Venv seems pretty straightforward once you’ve learned the one activate command. I don’t really get that uv solves all these problems ve never encountered. Just make a venv and use it seems to work fine.

> I don’t really get that uv solves all these problems ve never encountered. Just make a venv and use it seems to work fine.

For me package installation is way, way faster with uv, and I appreciate not needing to activate the virtual environment.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#348
post #230

This article appears to be NOT about someone who discovered uv after using venv/pip, but rather an article about someone who discovered uv after not using virtual environments at all, and is mostly excited about the cleanliness of virtual environments.

The article shows some advantages compared to plain virtual environments: In principle, you can ‘activate’ this new virtual environment like any typical virtual environment that you may have seen in other tools, but the most ‘uv-onic’ way to use uv is simply to prepend any command with uv run. This command automatically picks up the correct virtual environment for you and runs your command with it. For instance, to r…

> The article shows some advantages compared to plain virtual environments

No; they are plain virtual environments. There is no special kind of virtual environment. Uv simply offers its own command structure for managing those environments. In particular, `uv run` just ensures a venv in a specific location, then uses it.

There is no requirement to activate virtual environments in order to use them (unless you have some other tooling that specifically depends on the environment variables being set). You can, similarly, "just do"

  .venv/bin/python myscript.py
without uv installed.

> This command automatically picks up the correct virtual environment for you

Some people dislike such magic, especially since it involves uv having an opinion about where the virtual environment is located.

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#349
post #58

I hadn't paid any attention to rust before uv, but since starting to use uv, I've switched a lot of my performance-sensitive code dev to rust (with interfaces to python). These sorts of improvements really do improve my quality of life significantly. My hope is that conda goes away completely. I run an ML cluster and we have multi-gigabyte conda directories and researchers who can't reproduce anything because just to…

Obligatory: Not only rust would be faster than python, but Rust definitely makes it easy with Cargo. Go, C, C++ should all exhibit the performance you are seeing in uv, if it had been written in one of those languages. The curmudgeon in me feels the need to point out that fast, lightweight software has always been possible, it's just becoming easier now with package managers.

NOW? with package managers

Re: Uv is the best thing to happen to the Python ecosystem in a decade

#350
post #193

Earlier quoted context omitted.

poetry gave us lock files and consistent installs for years. uv is much, much faster however.

I used poetry professionally for a couple of years and hit so many bugs, it was definitely not a smooth experience. Granted that was probably 3-4 years ago.

The very first time I tried to use Poetry I ran into a bug where it couldn't resolve some simple dependencies.

uv actually works.

Post reply on HN