campaslab / napari-stress

Interactive surface analysis in napari for bio-mechanical stress measurement
https://campaslab.github.io/napari-stress/
BSD 3-Clause "New" or "Revised" License
17 stars 4 forks source link

Dependency conflict with morphometrics #73

Open haesleinhuepf opened 2 years ago

haesleinhuepf commented 2 years ago

It would be cool if napari-stress was compatible with morphometrics. Unfortunately, we have a dependency conflict at the moment.

If morphometrics is installed correctly (numpy 1.21.5), pip complains:

pyshtools 4.10 requires numpy>=1.22.3, but you have numpy 1.21.5 which is incompatible.

If napari-stress is installed correctly (numpy 1.22.4), pip complains:

morphometrics 0.0.1 requires numpy==1.21.5, but you have numpy 1.22.4 which is incompatible.

After a quick chat with @kevinyamauchi in https://github.com/kevinyamauchi/morphometrics/issues/25 , I presume it would be good if we could pin numpy < 1.22 in napari-stress. But it needs to be tested if our functionality depending on pyshtools still works then.

kevinyamauchi commented 2 years ago

Hey, @haesleinhuepf ! I agree it would be great to maintain compatibility. It looks like numba has resolved the numpy issues that required < 1.22 (links below) in 0.55.2. As of a couple of weeks ago, 0.55.2 was available on pypi and it looks like it will be on Vonda-forge soon (already available on numba channel. In light of this, I will try removing the numpy constraint and instead add a numba constraint in morphometrics, which should alleviate this dependency conflict. I’ll ping you in the PR once I’ve made the test.

https://github.com/numba/numba/issues/7754

kevinyamauchi commented 2 years ago

FYI, I've updated the numpy dependency in morphometrics: https://github.com/kevinyamauchi/morphometrics/pull/26

haesleinhuepf commented 2 years ago

Awesome, thanks @kevinyamauchi !

I'd like to explore anyway if we can relax this dependency version constraint... There have been other projects (stardist?) which are quick picky about their numpy version...

kevinyamauchi commented 2 years ago

I had a quick look at the pyshtools library out of curiosity and I don't really understand what is setting their numpy version requirement. To me it actually looks like they set it to whatever version of numpy is currently in the environment upon installation (see this line). I am curious if this is going to cause an issue where the required numpy version will depend on when and in what order pyshtools was added to the environment.

I'd like to explore anyway if we can relax this dependency version constraint... There have been other projects (stardist?) which are quick picky about their numpy version...

I agree it makes sense to try to be as relaxed as possible with the numpy dependency seeing as many (most?) scientific python packages depends on it.

haesleinhuepf commented 2 years ago

To me it actually looks like they set it to whatever version of numpy is currently in the environment upon installation (see this line).

I had the same suspicion. It could be a different random-ish version depending on who releases it from where.