Imresize import error: cannot import name ‘imresize’

Import imresize in Python code:

from scipy.misc import imresize

Unable to import due to the following error:

ImportError: cannot import name 'imresize'

This is due to the problem with the version of SciPy. The function imresize will no longer be included in the version after SciPy 1.3.0

imresize is deprecated! imresize is deprecated in SciPy 1.0.0, and will be removed in 1.3.0. Use Pillow instead: numpy.array ( Image.fromarray (arr).resize()).

Therefore, in order to use imresize, you need to reduce SciPy to an earlier version:

pip3 install scipy==1.1.0

Problem solving.


Read More: