Things I wish Pip learned from Npm
Alon Nisser
1669

@MichaelRyanSoileau: you can already do that in Python via pip install -r requirements.txt

`requirements.txt` is the equivalent of `package.json`

I don’t like the fact that a module-dependency file (package.json) can also run tests, do builds, and arbitrary stuff. I prefer the single responsibility principle approach of pip’s `requirements.txt` which just does one thing — specify dependencies — and I think it does it fairly well, especially in combination with `virtualenv` and `virtualenvwrapper`.

I’ve experienced excruciatingly-intricate “dependency hell” scenarios with npm. Scenarios where the developer says “It builds fine on my laptop” but the “npm install” installs a backward-incompatible dependency on a clean system that breaks the build. Tracking down the culprit package can be very painful in my experience. `npm shrinkwrap` also doesn’t save the day here because it too can error out (extraneous dependencies and bad peer dependencies: problems that still recur even with the latest versions of npm).

Of course, “dependency hell” also happens sometimes in Python/pip. We really need better package management system in general.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.