Lots of programming languages have their own package manager, separate from the distribution or OS package manager.
Going loosely from the TIOBE index:
- Python has Pip
- C# has NuGet
- Javascript has
npmfor Node.js - Visual Basic also uses NuGet
- R has a repository of packages that can be installed by running
install.packages("something")in R - Rust has Cargo/Crates
- Go has the
go getcommand - Swift has its own package manager
swift package - Ruby has RubyGems
- Java has Maven and Gradle (not sure if they are full package managers, or build automation tools with dependency resolution)
- PHP has Composer for managing libraries and dependencies
- C and C++ are the only exceptions I can think of, off the top of my head; libraries are managed by, and coupled to, the operating system
Simplest answer: it enables programmers on any variation of an OS to get code. If I’ve got a python requirements.txt, getting those requirements installed is the same on any system I’ve got an appropriate python version. The designers of the languages effectively deemed that an important goal and explicitly put in the effort to include package management, in at least most of your listed cases.
Perl CPAN has been snubbed.
One thing also important here is that not all os / distro package managers let you pin or choose versions. When you update you update. Software projects often lock dependencies to specific known working versions, which package managers generally support
Because it’s one central repository regardless of distribution or even OS.
And also having to check OS compatibility for every package you want to use.
I wanna tackle the question „What’s the benefit?“ first. Imagine one package manager with one repository to serve multiple languages. Now I want to install a library for my rust project and I include a Python library (maybe by accident, maybe intentionally). What’s supposed to happen? Rust can’t call into Python so it can’t work.
So ideally libraries would have to be scoped to specific languages, and now we’re almost back to the original situation but with a worse package manager.And what if I want to include a C++ library in Rust? If that library isn’t heavily using external C then the ABIs are going to be incompatible, and I still can’t use the library properly.
Does that fictional generic package manager also have to ensure compiled languages compile in a ABI compatible manner automagically?
And what is the OS package manager gonna do when you have two separate projects requiring two different versions of the same dependency?
C and C++ are the only exceptions I can think of, off the top of my head; libraries are managed by, and coupled to, the operating system
For C/C++ there’s conan, vcpkg, and whatever Redhat calls their scl system these days. I know there’s more, but those are the ones I can remember off the top of my head. You could argue that podman serves in this capacity to some degree.
Good question. They seem to be solving the same problem over and over. I think that nix could be the cross language solution, but it needs work.
deleted by creator
Is this meant to answer the question, or is it just a tangential rant?
Tbf, both C# and VB use NuGet. Which also functions as the command line software installer for Windows in general. So it is kind of what you are looking for.



