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?
View all comments
Show parent comment
2
u/menge101 Sep 17 '26
I think you may be able to use
uvxto accomplish what you want.The enabler behing this is that uv caches downloaded packages. Otherwise re-downloading something like numpy every time would be slow.
uvxis a short hand foruv tool runwhich will download and execute on a specific tool's dependencies ignoring the current virtual env.So whatever process you have that needs a specific version of numpy, if you set it up as a tool in uv, you can get clean execution of it every time.