Cannot import scipy.misc.imread

We Are Going To Discuss About Cannot import scipy.misc.imread. So lets Start this Python Article.

Cannot import scipy.misc.imread

How to solve Cannot import scipy.misc.imread

If you have Pillow installed with scipy and it is still giving you error then check your scipy version because it has been removed from scipy since 1.3.0rc1.
rather install scipy 1.1.0 by :
pip install scipy==1.1.0
check https://github.com/scipy/scipy/issues/6212

Cannot import scipy.misc.imread

If you have Pillow installed with scipy and it is still giving you error then check your scipy version because it has been removed from scipy since 1.3.0rc1.
rather install scipy 1.1.0 by :
pip install scipy==1.1.0
check https://github.com/scipy/scipy/issues/6212

Solution 1

If you have Pillow installed with scipy and it is still giving you error then check your scipy version because it has been removed from scipy since 1.3.0rc1.

rather install scipy 1.1.0 by :

pip install scipy==1.1.0

check https://github.com/scipy/scipy/issues/6212

Original Author user_3pij Of This Content

Solution 2

You might need to install PIL or Pillow.

Original Author carrier Of This Content

Solution 3

The method imread in scipy.misc requires the forked package of PIL named Pillow. If you are having problem installing the right version of PIL try using imread in other packages:

from matplotlib.pyplot import imread
im = imread(image.png)

To read jpg images without PIL use:

import cv2 as cv
im = cv.imread(image.jpg)

Original Author MasterJedi Of This Content

Solution 4

looking into the documentation it says scipy.misc.imread is deprecated.
It says to install imageio, and to use imageio.imread instead.
Works great!

Original Author user42362 Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment