Live data from Hacker News

Uv's killer feature is making ad-hoc environments easy

valatka.dev

121–130 of 428 posts

Re: Uv's killer feature is making ad-hoc environments easy

#122

Earlier quoted context omitted.

pip's resolving algorithm is not sound. If your Python projects are really simple it seems to work but as your projects get more complex the failure rate creeps up over time. You might pip install something and have it fail and then go back to zero and restart and have it work but at some point that will fail. conda has a correct resolving algorithm but the packages are out of date and add about as many quality probl…

May I introduce you to our lord and saviour, Nix and it's most holy child nixpkgs! With only a small tithing of your sanity and ability to Interop with any other dependency management you can free yourself of all dependency woes forever ! [ ] For various broad* definitions of forever. [*] Like, really, really broad** [**] Maybe a week if you're lucky

Nix is really the best experience I've had with Python package management but only if all the dependencies are already in nixpkgs. If you want to quickly try something off github it's usually a pain in the ass.

Re: Uv's killer feature is making ad-hoc environments easy

#123

Earlier quoted context omitted.

I don’t exactly remember the situation but a user created a python module named error.py. Then in their main code they imported the said error.py but unfortunately numpy library also has an error.py. So the user was getting very funky behavior.

... it's tricky. In Java there's a cultural expectation that you name a package like package organization.dns.name.this.and.that; but real scalability in a module system requires that somebody else packages things up as package this.and.that; and you can make the system look at a particular wheel/jar/whatever and make it visible with a prefix you specify like package their.this.and.that; Programmers seem to hate rigo…

But let's all be real here: the ability of __init__.py to do FUCKING ANYTHING IT WANTS is insanity made manifest

I am kind of iffy on golang's import (. "some/packge/for/side-effects") but at least it cannot suddenly mutate GOPATH[0]="/home/jimmy/lol/u/fucked" as one seems to be able to do on the regular with python

I am acutely aware that is (programmer|package|organization|culture)-dependent but the very idea that one can do that drives us rigorous people stark-raving

Re: Uv's killer feature is making ad-hoc environments easy

#124

Earlier quoted context omitted.

I can't see why anyone is using Conda in 2025. In 2018, yeah, pip (now uv) was hard and you could get a "just works" experience installing Tensorflow + NVIDIA on Conda. In 2023 it was the other way around and it still is.

Well, when you're building python packages that have non python dependencies and a big chunk of your users are on Windows, conda is the only option, even in 2025 :) Examples include, quant libraries, in-house APIs/tools, etc.

I’m on Windows and I categorically refuse to install Conda. It’s not necessary.

Re: Uv's killer feature is making ad-hoc environments easy

#125

Earlier quoted context omitted.

I don't understand how things like this get approved into PEPs.

I don't think this IS a PEP, I believe it is simply something the uv tool supports and as far as Python is concerned it is just a comment.

https://peps.python.org/pep-0723/

Re: Uv's killer feature is making ad-hoc environments easy

#126

Earlier quoted context omitted.

I never used anything other than pip. I never felt the need to use anything other than pip (with virtualenv). Am I missing anything?

Couple of things. - pip doesn't handle your Python executable, just your Python dependencies. So if you want/need to swap between Python versions (3.11 to 3.12 for example), it doesn't give you anything. Generally people use an additional tool such as pyenv to manage this. Tools like uv and Poetry do this as well as handling dependencies - pip doesn't resolve dependencies of dependencies. pip will only respect versio…

Sometimes I feel like my up vote doesn't adequately express my gratitude.

I appreciate how thorough this was.

Re: Uv's killer feature is making ad-hoc environments easy

#127
post #94

Earlier quoted context omitted.

May I introduce you to our lord and saviour, Nix and it's most holy child nixpkgs! With only a small tithing of your sanity and ability to Interop with any other dependency management you can free yourself of all dependency woes forever ! [ ] For various broad* definitions of forever. [*] Like, really, really broad** [**] Maybe a week if you're lucky

Except python builders in nixpkgs are really brain damaged because of the writers ways they inject search path which for example breaks if you try to execute a separate python interpreter assuming same library environment...

Within the holy church of Nix the sect of Python is troubled one, it can however be tamed into use via vast tomes of scripture. Sadly these times can only be written by those you have truly given their mind and body over to the almighty Nix.

Re: Uv's killer feature is making ad-hoc environments easy

#128

Earlier quoted context omitted.

I don't understand how things like this get approved into PEPs.

I don't think this IS a PEP, I believe it is simply something the uv tool supports and as far as Python is concerned it is just a comment.

No, this is a language standard now (see PEP 723)

Re: Uv's killer feature is making ad-hoc environments easy

#129

Earlier quoted context omitted.

May I introduce you to our lord and saviour, Nix and it's most holy child nixpkgs! With only a small tithing of your sanity and ability to Interop with any other dependency management you can free yourself of all dependency woes forever ! [ ] For various broad* definitions of forever. [*] Like, really, really broad** [**] Maybe a week if you're lucky

The Nix of Python, conda, was already mentioned. > add about as many quality problems as they fix

I used to have 1 problem, then I used Nix to fix it, now I have 'Error: infinite recursion' problems.

Re: Uv's killer feature is making ad-hoc environments easy

#130
post #26

As a NodeJS developer it's still kind of shocking to me that Python still hasn't resolved this mess. Node isn't perfect, and dealing with different versions of Node is annoying, but at least there's none of this "worry about modifying global environment" stuff.

Python has been cleaning up a number of really lethal problems like: (i) wrongly configured character encodings (suppose you incorporated somebody else's library that does a "print" and the input data contains some invalid characters that wind up getting printed; that "print" could crash a model trainer script that runs for three days if error handling is set wrong and you couldn't change it when the script was runni…

> Python has been cleaning up a number of really lethal problems like

I wish they would stick to semantic versioning tho.

I have used two projects that got stuck in incompatible changes in the 3.x Python.

That is a fatal problem for Python. If a change in a minor version makes things stop working, it is very hard to recommend the system. A lot of work has gone down the drain, by this Python user, trying to work around that

Post reply on HN