Import Error: 'scipy.misc import imsave' on Google Colaboratory

17,042

Solution 1

From documentation here, imsave is deprecated. You can use imageio.imwrite instead.

In case you really need it, you can install an older scipy version.

!pip install -U scipy==1.2.0

Solution 2

Use

from keras.preprocessing.image import save_img

Instead of

from scipy.misc import imsave

Solution 3

imsave is deprecated! imsave is deprecated in SciPy 1.0.0, and will be removed in 1.2.0. Use imageio.imwrite instead.

this is detail.

Share:
17,042

Related videos on Youtube

Ali Khan
Author by

Ali Khan

Updated on September 16, 2022

Comments

  • Ali Khan
    Ali Khan over 1 year

    Not able to use scipy.misc.imsave on Colaboratory

    from scipy.misc import imsave
    

    ImportError: cannot import name 'imsave'

    Tried to install Pillow and Scipy again on Colab, but the requirements are already satisfied, so Colab does not install these packages

  • Mobeen
    Mobeen over 4 years
    There is no module named "imwrite" in imageio.