3 ms·
How do you manage the specific version of transitive dependencies? For example, I install library A and it requires library B, but your code doesn’t use B direc
by jshen 6y ago
How do you manage the specific version of transitive dependencies? For example, I install library A and it requires library B, but your code doesn’t use B directly?
A better question, what’s your workflow for installing a dependency and 6 months later updating that dependency?
- beagle3 6y agoJust put them in your requirements.txt even if you don’t depend on them directly. That’s basically the whole idea of conda’s solver, I think. If your list works - fine. If n9t, it will find a set of package installs that makes it work. I guess that’s also why my resolution times are way faster than what some people describe. I treat requirements.txt closer to a manually curated lock file than a wishlist (which most req.txt files in the wild are).
- jshen 6y agoThis is a giant pain in the ass compared to every other modern language. Either you’re manually managing precise versions for all direct and transitive dependencies or you aren’t running exactly the same versions of libraries across team members and environments which would be horrifying.
- beagle3 6y agoThere is a command (not freeze) that dumps the exact versions deployed, similar to a lock file. I never used it, because it doesn’t work well across operating systems (e.g. do it on Windows and try to use it on Linux). This is less of a Conda problem and more of a Python problem - same package name/version has different dependencies on different architectures. But manually curating the dependencies has been painless and works fine for me and my team for almost a decade now.
- jshen 6y agoI prefer that my tools do the busy time consuming manual work when possible. Every other language I use has better tooling than python for this.