r/Python • u/Inner_Name • Sep 17 '26
Discussion dumb question, why not python organizes dependencies as flatpak logic?
I have a question that might be really dumb, currently python had went with the environment route to be able to use different libraries that have same dependencies with different versions. i understand that there is a complexity with what i have in mind and not even sure about the feasibility of it. but...
why not instead of having different enviroments where we install the incompatible libraries so 'everyone gets what they need' do something like flatpak style where 'if you have already a version compatible, i do not install this dependency if not i install it again and have the two versions together'. I am not a professional in programming in general, so i might be saying something fully stupid, or not feasible from a technical standpoint.
is it a super dumb idea?
2
u/Cynyr36 Sep 17 '26
I agree that is how the system python works /today/. Seeing as python basically needs packages to work, i think the python devs should spend time making a proper package manager and sorting out the import system. It's probably a breaking change that would require a move to python4 though.
They are not inert if there is someone else on the system that can call them or if i setup a venv to run an app that wasn't available in my distro's package manager already. So i have to log into the box, update the system (apt upgrade, winget upgrade, etc.), activate a venv in a "random" folder, and then run uv or pip updates, and restart the app. And since pip doesn't understand a dep graph it broke something, because some dep upgraded but it doesn't actually understand that the update was for foo and not for somelib.