Open hermidalc opened 3 days ago
Thanks for bringing this up @hermidalc. Hm, I'm not sure what the general solution is though.
When a dependency makes a breaking change (say from 0.x to 1.0), and the dependent library needs to update (from 1.x to 2.0) to resolve, the dependent library will require the dependency to be >=1.0 (via requirements.txt).
But, like you've brought up, the old dependent library 1.x hasn't changed its requirements. It feels both very right and very wrong to back to all 1.x versions and force the dependency to be <1.0, would you agree?
I'm not the first to experience this, so what's the recommended solution?
I'm not the first to experience this, so what's the recommended solution?
No one who's installed lifelines <0.29 (any lifelines version were you have import scipy.integrate.trapz
would've ever gotten it to work without that immediate error when they ran their script without themselves forcing scipy <1.14 in their conda environment yaml if nothing else in their dependencies didn't already silently need that too.
So anyone installing lifelines <0.29 usually didn't get things working right out of the box, which I think would be frustrating to general users. I had to go manually search scipy for the newest version that still allowed import scipy.integrate.trapz
to find <1.14 still supported it. So since lifelines install won't work out of the box I'm in favor of your conda install requirements specifying e.g. scipy >=1.2,<1.14
, you already require minimum scipy you just need to add the second req. Then things will work out of the box as they should.
I also think a lot of conda package managers also just always add upper version limits to their deps to be <x.xx
where x.xx
is one minor number greater than the latest version they know works and they've tested with their package. Then you'll never run into this problem. This isn't perfect because if a later dep version will work in the future you will have to change this after testing that it does indeed work.
I also think a lot of conda package managers also just always add upper version limits to their deps to be
<x.xx
wherex.xx
is one minor number greater than the latest version they know works and they've tested with their package. Then you'll never run into this problem. This isn't perfect because if a later dep version will work in the future you will have to change this after testing that it does indeed work.
Maybe I'm wrong about this pariticular idea, nevermind. I don't see scikit-learn doing it https://github.com/conda-forge/scikit-learn-feedstock/blob/main/recipe/meta.yaml
Solution to issue cannot be found in the documentation.
Issue
For all lifelines conda packages <0.29, you need to specify scipy <1.14 requirement, otherwise you will get this error below because as of 1.14 integrate.trapz is gone
Installed packages
Environment info