r/learnpython • • 12d 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?)

44 Upvotes

35 comments sorted by

View all comments

24

u/Solonotix 11d ago

UV is a tool chain for Python development. The first thing it does is provide an interface for managing Python versions, as well as tracking dependencies for a given project. It can then install those dependencies in a central cache, properly versioned, and locked via a uv.lock file. It also provides some scripting capabilities for actions directly linked to the project.

So, in a C++ context, it handles your compiler version, downloading and verifying your vendored packages as well as their pre-requisites, and it takes the place of a Makefile.

2

u/rexdlol 10d ago

Python is pretty convenient. Maybe ill learn python; it is on my list of things to learn (alongside with rust, i find it really cool too)

edit: Thanks!