Does speed really matter during python installation?
On my system, Pip takes noticeable time just to start up without ultimately doing anything of importance: $ time pip install ERROR: You must give at least one requirement to install (see "pip help install") real 0m0.356s user 0m0.322s sys 0m0.036s (Huh, that's a slight improvement from before; I guess pip 25.3 is a bit better streamlined.)
Uv is the best thing to happen to the Python ecosystem in a decade
481–490 of 1001 posts
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#482> 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
#483Earlier quoted context omitted.
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.
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
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#484Earlier quoted context omitted.
As far as I get it, conda is still around because uv is focused on python while conda handles things written in other languages. Unless uv gets much more universal than expected, conda is here to stay.
There is also pixi (which uses uv for the python side of things) which feels like uv for conda.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#485I 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…
Have you figured out a good way to manage CUDA dependencies with uv?
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#486Earlier quoted context omitted.
> Has the ecosystem fully moved on to uv, now? It's moving pretty quick. > Do they have good influence on what python's main ecosystem is moving to? Yes, they're an early adaptor/implementer of the recent pyproject.toml standards.
As someone that is fine on poetry for a few things, is there a good pitch deck on why I should change over?
It’s hard to demonstrate the speed difference in a pitch deck.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#487Earlier quoted context omitted.
https://docs.astral.sh/uv/guides/integration/pytorch/#using-... does that fit the bill?
Not the OP but does this actually package CUDA and the CUDA toolchain itself or just the libraries around it? Can it work only with PyTorch or "any" other library? Conda packaging system and the registry is capable of understanding things like ABI and binary compatibility. It can resolve not only Python dependencies but the binary dependencies too. Think more like dnf, yum, apt but OS-agnostic including Windows. As f…
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#488Earlier quoted context omitted.
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.
I've programmed all those languages before (learned C in '87, C++ in 93, Go in 2015 or so) and to be honest, while I still love C, I absolutely hate what C++ has become, Go never appealed to me (they really ignored numeric work for a long time). Rust feels like somebody wanted to make a better C with more standard libraries, without going the crazy path C++ took.
I stayed for the native functional programming, first class enums, good parts of C++ and the ultimate memory safety.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#489I 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
I have used pip freeze > requirements.txt pip install -r requirements.txt Way before "official" lockfile existed. Your requirements.txt becomes a lockfile, as long as you accept to not use ranges. Having this in a single tool etc why not, but I don't understand this hype, when it was basically already there.
Re: Uv is the best thing to happen to the Python ecosystem in a decade
#490For 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.
If I were to put on my security hat, things like this give me shivers. It's one thing if you control the script and specified the dependencies. For any other use-case, you're trusting the script author to not install python dependencies that could be hiding all manner of defects or malicious intent. This isn't a knock against UV, but more a criticism of dynamic dependency resolution. I'd feel much better about this i…
curl -LsSf https://astral.sh/uv/install.sh | sh """
Also isn't great. But that's how homebrew is installed, so ... shrug ... ?
Not to bash uv/homebrew, they are better than most _easy_ alternatives.