←back to thread

740 points chirau | 7 comments | | HN request time: 1.074s | source | bottom
Show context
acheong08 ◴[] No.44358882[source]
Just a few months back I said I would never use uv. I was already used to venv and pip. No need for another tool I thought.

I now use uv for everything Python. The reason for the switch was a shared server where I did not have root and there were all sorts of broken packages/drivers and I needed pytorch. Nothing was working and pip was taking ages. Each user had 10GB of storage allocated and pip's cache was taking up a ton of space & not letting me change the location properly. Switched to uv and everything just worked

If you're still holding out, really just spend 5 minutes trying it out, you won't regret it.

replies(11): >>44359172 #>>44359456 #>>44359522 #>>44359897 #>>44359946 #>>44360000 #>>44360262 #>>44360544 #>>44360813 #>>44361022 #>>44363908 #
1. espdev ◴[] No.44359172[source]
> Just a few months back I said I would never use uv. I was already used to venv and pip. No need for another tool I thought

Really? :)

requirements.txt is just hell and torture. If you've ever used modern project/dependency management tools like uv, Poetry, PDM, you'll never go back to pip+requirements.txt. It's crazy and a mess.

uv is super fast and a great tool, but still has roughnesses and bugs.

replies(4): >>44359212 #>>44359336 #>>44359431 #>>44359910 #
2. aequitas ◴[] No.44359336[source]
Pip-tools+requirements.txt helped me survive the past few years. I also never thought I needed uv, but after all the talk about it I gave it a spin and never want back. It’s just so blazing fast en convenient.
3. _Algernon_ ◴[] No.44359431[source]
pip also works with pyproject.toml. Sticking with requirements.txt is a self-imposed constraint.
4. kortex ◴[] No.44359910[source]
We use uv to compile requirements.txt from pyproject.toml to get the locked versions.

    # Makefile
    compile-deps:
     uv pip compile pyproject.toml -o requirements.txt
    
    compile-deps-dev:
     uv pip compile --extra=dev pyproject.toml -o requirements.dev.txt
replies(1): >>44360877 #
5. espdev ◴[] No.44360877[source]
What for? Support legacy CI/CD pipelines or something like that? uv.lock already contains locked versions of all dependencies plus a lot of other needed metadata.
replies(2): >>44361297 #>>44363302 #
6. halfcat ◴[] No.44361297{3}[source]
> What for? Support legacy CI/CD pipelines

Yes. Azure, for instance, looks for requirements.txt if you deploy a web app to Azure App Service.

If you’re doing a code-based deployment, it works really well. Push to GitHub, it deploys.

You can of course do a container-based deployment to Azure App Service and I’d assume that will work with uv.

7. esseph ◴[] No.44363302{3}[source]
"legacy CI/CD pipelines"

Damn I'm getting old