Maven and co.
> Suppose for example that I want to upgrade a package and all packages that it depends on, how would that be done?
Change the version number in pom.xml/build.sbt/build.gradle. Done.
> Or suppose I have different environments a project can be run in that should load slightly different set of dependencies?
Define a new project that depends on your main project and the extra dependencies.
Yes, pip, since before bundler existed.
> Suppose for example that I want to upgrade a package and all packages that it depends on, how would that be done?
pip install --upgrade package
> suppose I have different environments a project can be run in that should load slightly different set of dependencies?
venv activate myproject
I've run into bugs where someone ripped a library out of requirements.txt because they thought it wasn't being used any longer. Turns out it was still being used, but the dev couldn't tell because the lib was still in their venv. Tools like Bundler will actually take the dependency away from you.
Python's packaging system is great compared to C, but it's primitive compared to Ruby, Haskell, Clojure, and lots of others.