maweigert / spimagine

GPU accelerated volume rendering / processing in Python
BSD 3-Clause "New" or "Revised" License
117 stars 17 forks source link

Dependency issue with scikit-image 0.17.x #37

Closed sandscruise closed 4 years ago

sandscruise commented 4 years ago

Hi,

I have recently started to use spimagine for volume rendering of microscopy data. It works perfectly and I absolutely love spimagine. However, while installing spimagine through conda withing my existing conda environment I noticed my scikit-image package has been downgraded from 0.17.x to 0.16.x which caused some problems in my codes which is heavily dependent on scikit-image features.

I guess there is some depenedncy isuue between spimagine and latest version of scikit-image but I was not able to figure that out. Could you please advise how can I have the latest-version of scikit-image working with spimagine?

Cheers

maweigert commented 4 years ago

Hi @sandscruise,

Thanks for the kind words!

spimagine should not depend on scikit-image and thus should work with either version. As the conda package was kindly prepared by @tlambert03, maybe he know what could be the reason? Alternatively, you could just install it with pip install spimagine (which should not downgrade scikit-image).

Hope that helps,

Martin

sandscruise commented 4 years ago

Hi @maweigert,

Thanks for getting back. I really appreciate that. I tried installing spimagine with pip but it broke my whole conda environment after installing PyQt5 from pip. I got the following error message while using pip to install spimagine:

''' ERROR: spyder 4.1.3 requires pyqtwebengine<5.13; python_version >= "3", which is not installed. ERROR: spyder 4.1.3 has requirement pyqt5<5.13; python_version >= "3", but you'll have pyqt5 5.15.0 which is incompatible. ERROR: scikit-tensor-py3 0.4.1 has requirement numpy==1.16., but you'll have numpy 1.18.4 which is incompatible. ERROR: scikit-tensor-py3 0.4.1 has requirement scipy==1.3., but you'll have scipy 1.4.1 which is incompatible. Installing collected packages: configparser, PyQt5-sip, pyqt5, spimagine, scikit-tensor-py3 Successfully installed PyQt5-sip-12.8.0 configparser-5.0.0 pyqt5-5.15.0 scikit-tensor-py3-0.4.1 spimagine-0.2.6 '''

I used to run spyder fine but it is now broken, I guess due to installing PyQt5 through anaconda. Sorry I am pretty new to python and would really appreciate any help regarding this.

Cheers

maweigert commented 4 years ago

Sorry to hear that :(

Can you try to install the missing dependency and downgrade pyqt5?

pip install pyqtwebengine

pip install --force-reinstall pyqt5==5.12.0

tlambert03 commented 4 years ago

sorry you're having issues with the conda install @sandscruise. I can repeat it, fwiw... It's true that the spimagine conda recipe shouldn't be depending directly on scikit-image, but presumably one of spimagine dependencies is pinned to a version that is itself dependent on an older version of scikit-image (since the current conda package is years old at this point). This will probably require an updated conda recipe (the current one has some old versions pinned which probably don't need to be pinned), but I unfortunately don't have time to work on this at the moment. (It should probably be moved to conda forge too).

it is definitely notoriously difficult to use both pip and conda to install Qt-dependent projects into the same environment, and I feel your pain there...

In the meantime, I would keep in mind that while conda will often fails to install if all dependencies versions aren't strictly met, pip does not. So you may have luck if you install what you need in conda, then "undo" it with pip. For instance, I just created a new conda environment and then conda installed spimagine (it worked)... then I ran pip install scikit-image -U to upgrade it. While it gave some warnings, it happily updated scikit-image and spimagine still seems to work fine. So until someone gets around to updating the conda recipe, I would try stuff like that.

sandscruise commented 4 years ago

Hi @maweigert and @tlambert03,

Many thanks for your suggestions. Unfortunately, installing missing dependency and downgrading pyqt5 with pip did not work. However, I was able to get around this issue following @tlambert03's suggestion by upgrading scikit-image with pip.

Thank you guys again. I really appreciate your help.

Cheers!