I have a Mac with 4TB of storage but it’s still annoying when every new AI app I try installs its own virtual environment with a fresh copy of Python, PyTorch, other duplicate libraries, and then models on top of that.
As an occasional python user I'm always amazed and frustrated that it seems that the only way to be able to use/build anything is to create a whole separate environment.
And now given everybody now does this I guess the incentive to stop breaking stuff reduces even further.
The meme phrase “it’s fractally wrong” applies to the entire python ecosystem, IMHO. Virtual environments are just another layer of this fractal wrongness in the layer cake of ecosystem awfulness.
That’s exactly how NPM works, and how Cargo works by default. You can make npm install stuff globally, but that’s not recommended except for things like CLI tooling. Cargo builds every project in its own separate targets/ directory unless you manually configure it to share that dir between builds. In both cases, the default is to isolate your current project from everything else on the system.
The main difference is that Python use to make you have to know that the virtualenv existed. Now `uv run` and `poetry run` abstract that away so you don’t have to interact with it if you don’t want to.
I understand it's meme that operates well outside python - python seems particularly bad due to many packages having system dependencies in addition to package to package dependencies.
I'm just speculating that's it's a self reinforcing pattern - compatibility problems leads to isolated builds, which reduces peoples concern for backwards compatibility, which makes isolated builds ever more important.
Maybe it's fine - a trade off that allows greater velocity of development, it just seems attention to backwards compatibility is becoming a thing of the past.
I have a couple small apps that have a (non-LLM) model, and originally the models and code were in PyTorch, built by Python devs.
The original plan was to ship Python. However I found out I can migrate them to CoreML, and now it's a model file + Swift code. I got some massive performance improvements as well.
Of course, this doesn't work at all for non-Mac environments, but it was nice to be able to do it. (Also doesn't solve the duplicate large models problem)