pyapp-kit / superqt

Missing widgets and components for Qt-python
https://pyapp-kit.github.io/superqt/
BSD 3-Clause "New" or "Revised" License
210 stars 38 forks source link

Dependency version conflict with noise2void/keras~=2.3/tensorflow~=2.5 #100

Closed haesleinhuepf closed 2 years ago

haesleinhuepf commented 2 years ago

Describe the bug Hi @tlambert03 ,

I'm working on a napari-plugin for noise2void, which is based on a slightly outdated version of tensorflow. It is compatible with tensorflow versions about 2.5 which is just about 1 year old.

When installing it together with recent napari, I'm receiving a dependency error because of superqt. I'm wondering if it would be possible to relax the constraint typing-extensions>=3.10.0.0 to something more compatible to typing-extensions~=3.7.4:

https://github.com/napari/superqt/blob/a3b0f1b1150b055ab25e1b462293368e68255f28/setup.cfg#L41

To Reproduce In an empty environment

pip install superqt==0.3.3 tensorflow==2.5

causes this error:

ERROR: Cannot install superqt==0.3.3 and tensorflow==2.5.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    superqt 0.3.3 depends on typing-extensions>=3.10.0.0
    tensorflow 2.5.0 depends on typing-extensions~=3.7.4

See also:

A bit more context:

https://github.com/juglab/n2v/blob/11669b7e09633f007c5920feb713fc955dbe4da8/setup.py#L49

https://github.com/keras-team/keras/blob/b5cb82c689eac0e50522be9d2f55093dadfba24c/setup.py#L35

https://github.com/tensorflow/tensorflow/blob/a4dfb8d1a71385bd6d122e4f27f86dcebb96712d/tensorflow/tools/pip_package/setup.py#L93

Thanks!

Best, Robert

tlambert03 commented 2 years ago

Yeah, I came across that (rather ridiculous) pin in the past. I even looked through their source to see why, and there was no good reason for that pin. It's rather frustrating.

You can see some discussion here: https://github.com/napari/superqt/issues/45

I'll see what I can do

tlambert03 commented 2 years ago

Side note, I know the Jug lab is also working on such a plugin... are you collaborating with them?

tlambert03 commented 2 years ago

while you're waiting on this, an even greater service to the community would be to open an issue with tensorflow. I would be really surprised if later versions of typing-extensions didn't also work for them. That pin is really troublesome and consequential for a lot of packages.

haesleinhuepf commented 2 years ago

In the recent version of tensorflow it's already fixed: https://github.com/tensorflow/tensorflow/blob/d42edf7010ec8e031799503759a76061b25b0068/tensorflow/tools/pip_package/setup.py#L99

tlambert03 commented 2 years ago

i mean a backport ... eg 2.5.0-post1