Solve the problem of error reporting from scipy.misc import imread & imresize in Python

from scipy.misc import imread& imresize

Problem description solution 1 solution 2

Problem description

from scipy.misc import imread # error

After query, the reason is that the from scipy.misc import imread, imwrite and other methods have been abandoned, and python has encapsulated the imread method in the imageio module

Solution 1

To install the imageio Library:

pip install imageio 

Normal use!

import imageio
imageio.imread("xxxx.png")

Solution 2

If the higher version is discarded, we can reduce the SciPy version!

Reduce the SciPy version to 1.2.1

pip install scipy==1.2.1

Read More: