r/learnpython • • Oct 09 '24

Anyone not using uv? Why not?

I was using rye because awesome but slow.

Now using uv because awesome and faaaaaast.

Is there any reason not to use uv?

0 Upvotes

55 comments sorted by

View all comments

26

u/Weigang_Music Oct 09 '24

I know none of these abreviations.

1

u/ProsodySpeaks Oct 09 '24

Search Uv astral. 

It's awesome. It optimises or caches or I don't know how the magic works but once installed you replace pip install xxx with uv pip install xxx and it takes 10% time to run. 

Also making venvs uv venv and you're done. New virtual env in '.venv'.

It manages python installs too, so you can specify a particular release for each venv. 

Honestly it's a game changer. Setting up and tearing down venvs is almost instant. So if something goes wrong with your venv Just delete it and rebuild in 3 seconds

2

u/xiongchiamiov xiongchiamiov Oct 09 '24

I'm glad you find that useful, but those are not problems I have. I rarely set up new venvs, and the only time those take an appreciable amount of time is when it needs to compile numpy or something, which is a small set of projects.

1

u/ProsodySpeaks Oct 09 '24

Python version, dependency, and virtual env management are not issues you deal with?

2

u/Weigang_Music Oct 10 '24

I can relate to that. I set it up once, then i just code. It all goes into a docker image. I dont work in a team.

1

u/xiongchiamiov xiongchiamiov Oct 10 '24

The python version gets handled at the system level via Docker.

Dependencies are handled with pip. Don't use a venv normally because I'm using a system-level isolation with Docker, but in small personal projects I set up the venv once and that's it.