Live data from Hacker News

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

emily.space

321–330 of 1001 posts

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

#321

Honestly though it's a pretty rough indictment of Python that the best thing to happen in a decade is that people started writing Python tools in Rust. Not even a little Rust, uv is 98% Rust. I mean, they just released 3.14 and that was supposed to be a pretty big deal.

Who cares what it is written in?

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

#322
post #188

Earlier quoted context omitted.

>finally get a taste of npm good god no thank you. >cargo more like it.

cargo is better than npm, yes, but npm is better than pip (in my experience)

As someone who moved from Python to NodeJS/npm ~10yrs ago I can fully support that statement. Dissatisfaction with Python's refusal to get its dependency/package-management act together and seeing how reasonably the task is being dealt with by `npm`—notably with all its flaws—made me firmly stay with NodeJS. Actually virtualenv was for me another reason to keep my fingers out of whatever they're doing now over there in Python-land, but maybe `uv` can change that.

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

#323
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…

Unless I'm an AI, I'm pretty sure "uv run" is the same number of characters as "python". So it's shorter. Also venvs are a translation layer already, changing path.

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

#324
post #222

For single-file Python scripts, which 99% of mine seem to be, you can simplify your life immensely by just putting this at the top of the script: #!/usr/bin/env -S uv run --script # /// script # requires-python = ">=3.11" # dependencies = [ "modules", "here" ] # /// The script now works like a standalone executable, and uv will magically install and use the specified modules.

I use this but I hate it. I want to be able to ship a bundle which needs zero network access to run, but will run. It is still frustratingly difficult to make portable Python programs.

I wouldn't be surprised if astral's next product would be something like this. It's so obvious and there would be much interest from the ML crowd.

My current hobby language is janet. Creating a statically linked binary from a script in janet is trivial. You can even bring your own C libraries.

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

#325
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…

I work professionally in ML and have not had to touch conda in the last 7 years. In an ML cluster, it is hopefully containerized and there is no need for that?

At least on my cluster, few if any workloads are containerized. We also have an EKS where folks run containerized, but that's more inference and web serving, rather than training.

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

#326
post #173
post #115

Earlier quoted context omitted.

This isn't a comment just about Python.. but it should just work. There shouldn't be constant ceremony for getting and keeping environments running.

There are basically 0 other programming languages that use the "directory/shell integration activated virtual environment", outside of Python. How does the rest of the world manage to survive without venvs? Config files in the directory. Shocking, really :-)))

The venv thing def stands out to me as being a bit of an outlier.

If uv makes it invisible it is a step forward.

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

#327

And still there are some annoying issues: dependencies = [ "torch==2.8.0+rocm6.4", "torchvision==0.23.0+rocm6.4", "pytorch-triton-rocm==3.4.0", ... ] There is literally no easy way to also have a configuration for CUDA, you have to have a second config, and, the worse, manually copy/symlink them into the hardcoded pyproject.toml file

Checkout dependency groups and uv conflicts configuration

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

#328
My biggest frustration is the lack of a good universal REPL to just play around with. It's frustrating how I have to run `uvx --with x,y,z ipython` every single time I just want to spin up some python code which may or may not use packages. (Hard to overstate how annoying it is to type out the modules list).

To me, Python's best feature is the ability to quickly experiment without a second thought. Conda is nice since it keeps everything installed globally so I can just run `python` or iPython/Jupyter anywhere and know I won't have to reinstall everything every single time.

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

#329
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…

5. No concept of global/shell/local venv auto activation, so get used to typing "uv run", or manually recreating these concepts, with shell stuffs.

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

#330
post #173

Earlier quoted context omitted.

There are basically 0 other programming languages that use the "directory/shell integration activated virtual environment", outside of Python. How does the rest of the world manage to survive without venvs? Config files in the directory. Shocking, really :-)))

The only word in the `source .venv/bin/activate` command that isn't a complete red flag that this was the wrong approach is probably bin. Everything else is so obviously wrong. source - why are we using an OS level command to activate a programming language's environment .venv - why is this hidden anyway, doesn't that just make it more confusing for people coming to the language activate - why is this the most generi…

Maybe it's just me, but it shouldn't be necessary to manage this and a few other things to get a python script working.

uv has increased my usage of python for production purposes because it's maintainable by a larger group of people, and beginners can become competent that much quicker.

Post reply on HN