6

I was trying some code segment,

from scipy import misc
im = misc.imread(file_image, True)

However, I got the error message such as

AttributeError: module 'scipy.misc' has no attribute 'imread'

What can be the reason of this?

user297850
  • 7,705
  • 17
  • 54
  • 76
  • Do you have Pillow installed also? The image stuff isn't available without it. – kindall Apr 06 '18 at 04:47
  • 1
    Possible duplicate of [scipy.misc module has no attribute imread?](https://stackoverflow.com/questions/15345790/scipy-misc-module-has-no-attribute-imread) – wwii Apr 06 '18 at 05:30

1 Answers1

6

This is because imread was discontinued by scipy as of 1.2.0, to solve it you can either install Pillow with

    pip install Pillow

or downgrade to 1.1.0 with

    pip install scipy==1.1.0
Mekaeel Malik
  • 61
  • 1
  • 5