Live data from Hacker News

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

emily.space

861–870 of 1001 posts

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

#863

I am a bit skeptical. You only have to look at the ruby ecosystem and the recent mass-expulsion of long-term developers from rubygems/bundler via RubyCentral going full corporate-mode ("we needs us some more moneeeeeys now ... all for the community!!!" - or something). While one COULD find pros in everything, is what is happening in different programming languages really better for both users and developers? I am not…

So you’ve learned one tool to handle this sort of complexity, but you are complaining that someone created a new one?

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

#865

The sticking point for me is the way tools like uv and poetry build everything around the idea of a "project". I don't want a separate environment for every project, and I don't want to start by creating a project. I want to start with an environment that has stuff in it, and I start fiddling around, and gradually something comes together that eventually will be pulled out into a separate project. From what I can see…

This was always my issue with pip and venv: I don’t want a thing that hijacks my terminal and PATH, flips my world upside down and makes writing automated headless scripts and systemd services a huge pain. When I drop into a Node.js project, usually some things have changed, but I always know that if I need to, I can find all of my dependencies in my node_modules folder, and I can package up that folder and move it w…

> This was always my issue with pip and venv: I don’t want a thing that hijacks my terminal and PATH ...

What's the "this" that is supposedly always your issue? Your comment is phrased as if you're agreeing with the parent comment but I think you actually have totally different requirements.

The parent comment wants a way to have Python packages on their computer that persist across projects, or don't even have a notion of projects. venv is ideal for that. You can make some "main" venv in your user directory, or a few different venvs (e.g. one for deep learning, one for GUIs, etc.), or however you like to organise it. Before making or running a script, you can activate whichever one you prefer and do exactly like parent commenter requested - make use of already-installed packages, or install new ones (just pip install) and they'll persist for other work. You can even switch back and forth between your venvs for the same script. Totally slapdash, because there's no formal record of which scripts need which packages but also no ceremony to making new code.

Whereas your requirements seem to be very project-based - that sounds to me like exactly the opposite point of view. Maybe I misunderstood you?

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

#866
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 :-)))

By requiring special tooling to build and run your program. Namely cargo, npm, etc, while in Python these are a bit more separate concerns.

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

#867

Should I try this? I, let’s say, code with Ai and am not an engineer. Python related environment stuff makes my head explode (across the 3 computers I use). It’s the main thing my brain just can’t seem to figure out.

Well if you want to code with AI you'll have to tell claude/codex constantly that you're using uv and sometimes it'll remember.

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

#868

Should I try this? I, let’s say, code with Ai and am not an engineer. Python related environment stuff makes my head explode (across the 3 computers I use). It’s the main thing my brain just can’t seem to figure out.

Yes. This is currently the best tool to handle python environments and dependencies and it's very popular. If you learn uv, and you really don't need to learn that much other than how to specify a python version and your dependencies, you (hopefully) should be set for a long time.

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

#870
post #782

> curl -LsSf https://astral.sh/uv/install.sh | sh "Just pipe a random script from the internet into your shell! What could possibly go wrong?"

We've all done it. I'm curious though, I wonder what would be the best way to prevent a user from doing this.

The user is the one copy-pasting that line in their terminal. There is no preventing them from doing it, they can `rm -rf /` if they feel like it.

They shouldn't, though...

Post reply on HN