Hacker News new | ask | show | jobs
by wiseowise 548 days ago
Cohesion and simplicity of use.

uv init; uv add

No more pip freeze, source .venv/bin/activate, deactivate bullcrap.

2 comments

You don't have to 'activate' anything if you don't want to. The bin/ directory inside your venv contain the binaries and scripted entrypoints for the packages installed in your virtualenv.
Yeah, and I don't "have" to use Make and build systems either, but it makes my life easier and bullshit free.
Why is it better if every command you use starts with `uv`? Why is it "bullcrap" the other way?
It’s not “uv” part that is important. It’s the focus on simplifying things you do thousands of times a week.
How does putting "uv" in front of the commands that you use simplify them?
uv init; uv add requests and you automatically get environment that can be easily shared between team members with predictable locking, with no “source .venv/bin/activate” bullshit.
Activating the venv only changes some environment variables. You can, as explained before, use the environment's Python executable directly instead. Activation does allow other tools to use the venv without having to know anything about it. The point is that you aren't then putting `uv run` in front of every command, because you don't need to have an integrator program that's aware of the venv being there.

If you had a bad experience with a different locking tool, sorry to hear it, but that has absolutely nothing to do with the venv itself nor its activation script.