maweigert / spimagine

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

Cannot import name 'imread' #30

Closed richhend closed 6 years ago

richhend commented 6 years ago

Hi,

After following the installation instructions for Anaconda (Python 3.6, Windows 10, 64 bit): conda install -c talley -c conda-forge python=3.6 spimagine pip install configparser pyqt5 and then running spimagine

I get the following error:

... File "C:\Users...\Anaconda3\lib\site-packages\spimagine\config\loadcolormaps.py", line 8, in from scipy.misc import imread ImportError: cannot import name 'imread'

scipy.misc.imread seems to be deprecated and replaced by imageio.imread ( see also https://stackoverflow.com/questions/48923151/importing-image-to-python-cannot-import-name-imread )

This I can import on my Anaconda installation without problems:

In [5]: from imageio import imread In [6]: imread Out[6]: function imageio.core.functions.imread

Would it be possible to fix this import by switching from scipy.misc.imread to imageio.imread?

Thanks a lot, and keep up the great work :)

richhend commented 6 years ago

It looks like downgrading to an older version of Pillow solves this problem and also other problems I encountered: pip uninstall pillow pip install pillow==4.0.0 ( see also https://stackoverflow.com/questions/43264773/pil-dll-load-failed-specified-procedure-could-not-be-found)

tlambert03 commented 6 years ago

thanks. I'll update the conda recipe to pin dependency versions.

maweigert commented 6 years ago

Thanks for the comment! I switched the dependency to imageio (and removed PIL along the way). I created a new release (0.2.4) which is on pypi, please check it out and let me know if that works for you.

tlambert03 commented 6 years ago

spimagine v0.2.5 is now on conda as well, with updated imageio and pyqt 5.9 dependencies. @richhend, let us know if you try it and have issues. Also noticed that you used pip install configparser pyqt5 in addition to the conda command... did you have a problem that led you to try that? In the past, there's been issues with pip installing pyqt5 on top of a conda pyqt5, but not sure if that's still the case. The conda install should have all the necessary deps, but let me know if it's not grabbing everything you need.

maweigert commented 6 years ago

Thanks Talley!