3 ms·
I absolutely love this trend of "pip install x" as a distribution mechanism for this kind of thing. People badmouth Python packaging a lot, but once you've lea
by simonw 3y ago
I absolutely love this trend of "pip install x" as a distribution mechanism for this kind of thing.
People badmouth Python packaging a lot, but once you've learned how to use a virtual environment (admittedly a steeper learning curve than I'd like it to be) having binary wheels for so much of this kind of stuff is a huge win.
See also Playwright, DuckDB, ziglang... I wrote a bit about those here https://simonwillison.net/2022/May/23/bundling-binary-tools-in-python-wheels/ https://simonwillison.net/2022/May/23/bundling-binary-tools-...
- pachico 3y agoI'm tempted to say that the very same reason why you need different environments is precisely because the package system is not healthy. And the fact that it's not easy to use doesn't really make things better.
- simonw 3y agoWhat packaging systems are there that don't encourage different environments for different projects? I think Python's biggest weakness on this front is mainly that virtual environments came along too late - if they'd been designed into how pip etc worked from the beginning we would be in much better shape.
- maxmcd 3y agoAny os-level package manager. Also: "npm -g", "pip install", "cargo install", etc.. Lots of programming languages or build systems will look for dependencies in globally-known locations. Other than cargo, python's virtualenv, node_modules, and some other modern languages/systems I would imagine most are not project-scoped. Go had a single global dependency tree until go.mod, etc...
- SahAssar 3y ago"npm" is a environment/scoped package manager. Saying "npm -g" when -g is a flag tell it to run in a non-default way (globally) is a bad argument.
- santiagobasulto 3y agoYes, agree. Specially with pipx.
- deleted 3y ago[deleted]
- justinsaccount 3y agoIt's not really a good trend when you want to know exactly what is being installed. https://hpc.guix.info/blog/2021/09/whats-in-a-package/ https://hpc.guix.info/blog/2021/09/whats-in-a-package/
- EuAndreh 3y agoThat is a very bad, no good idea. A good language-specific package manager should know how to resolve its dependencies and maybe install them locally, but most importantly provide this information to the system package manager (apt, rpm, etc.) to handle. Having "pip install x" is a poor man's ad-hoc system package manager.