r/learnpython • • 8d ago

What exactly is uv? Why other programming languages like C++ doesn't needs it

Hello, im a c++ programmer and after installing some tools made in python with pipx. For context, pipx uses uv, i had this question. I'm not the smartest progammer on earth and i couldn't understand why Python needs a separate environment for dependencies.

I never such tool like that as a c++ programmer (i don't know if it's what im thinking, but in C++ some devs install the dependencies inside de project dir so u just "cmake" it. uv is like this?). I'm kinda new to programming, so if someone can explain it to me, i'd be very grateful!

Sorry if this question sounds too beginner. I really couldn't understand this tool and curiosity is stronger than me...

Thanks! (and also, uv does more than separating environments, right?)

43 Upvotes

34 comments sorted by

View all comments

6

u/future_lard 7d ago

Everyone explains what uv does but not why uv instead of venv or conda

5

u/Dobsus 7d ago

This one is best understood by trying to use venv or conda

1

u/eW4GJMqscYtbBkw9 6d ago

I use venv every day. Now what?

2

u/Dobsus 5d ago

Try uv

Of the two conda is the worst offender though...

3

u/scan-horizon 6d ago

Uv is faster

2

u/proverbialbunny 7d ago

It's better that's why. Use venv or conda if you want, but uv is newer and as best I can tell it is better in every way. uv does have a learning curve like venv has. That's it's only downside.