> Npm, as much as it annoys me, is light-years ahead of anything in python.
Hence PEP 582:
> This PEP proposes to add to Python a mechanism to automatically recognize a __pypackages__ directory and prefer importing packages installed in this location over user or global site-packages. This will avoid the steps to create, activate or deactivate “virtual environments”. Python will use the __pypackages__ from the base directory of the script when present.
Right. I am confident they will get things in place to solve this. That it took so long for them to want to strengthens my assertion that the community was piggy backed on the machine package management for a lot of its initial popularity.
Hence PEP 582:
> This PEP proposes to add to Python a mechanism to automatically recognize a __pypackages__ directory and prefer importing packages installed in this location over user or global site-packages. This will avoid the steps to create, activate or deactivate “virtual environments”. Python will use the __pypackages__ from the base directory of the script when present.
https://peps.python.org/pep-0582/
I haven’t tried it yet, but there’s already a PEP 582-compatible dependency manager: PDM https://pdm.fming.dev/