I've almost completely switched from "Python" to "uv run"

18 actinium226 5 6/18/2025, 2:31:48 PM actinium226.substack.com ↗

Comments (5)

ethagnawl · 7h ago
Same here. The ability to specify dependencies and interpreter versions in the script and have the runtime just (quickly!) sort out all of the boring, uninteresting, brittle business around shims, virtualenvs, dependencies et al is absolutely game changing. I'm sure there are sharp edges I haven't found yet and that there will still be cross-platform compatibility issues which crop up but those will be addressed in due time.
actinium226 · 7h ago
Indeed, I've managed to find one cross-platform compatibility issue in that uv can't autoinstall python for musl for arm64, which I discovered when I tried to use it to install python in an alpine docker image on my M2 air. I didn't particularly need musl, I just wanted to save 50MB or so in my docker image so I went back to the slim version of the image I needed. But they're tracking this issue and there's so much effort going into making this tool better so I'm sure they'll get to it eventually.
IshKebab · 5h ago
Yep, it's the only sane option. Using uv takes Python from "oh no it's Python; how many hours am I going to spend working around pip bugs" to "hmm I might actually choose to use Python for this!".
Toritori12 · 6h ago
I wish there was a way to force all deps to create folders in the same directory by default. Tired of seeing how many libraries feel entitled to write on your Home (which I like to have in a small partition and those big GB-sized files are not expected).
jessekv · 6h ago
You can take it one step further and make the file executable and place this at the top of the file:

#!/usr/bin/env -S uv run