3

When i try to save an image using Scipy.misc.imsave('path',image).

I got this Error : module 'scipy.misc' has no attribute.

I am working on Ubuntu 17.10 and i have both pillow and scipy installed. Can you help me please.

Wassim Bouatay
  • 183
  • 2
  • 3
  • 10
  • Possible duplicate of [scipy.misc module has no attribute imread?](https://stackoverflow.com/questions/15345790/scipy-misc-module-has-no-attribute-imread) – MB-F Jul 29 '19 at 11:38

1 Answers1

14

scipy.misc.imsave has been deprecated since SciPy 1.0, and was removed in SciPy 1.2.

They suggest using imageio.imwrite (from the imageio library) instead.

AKX
  • 152,115
  • 15
  • 115
  • 172
  • Hi, I'm very new to Python but I've been developing for 15 years, I just don't understand how the old ```scipy.misc.imsave``` got it's image input to save? ```imageio.imwrite``` takes 2 parameters, path and image, but ```scipy.misc.imsave``` only takes one which is the path is it inherited or something? – Jay Croghan Jun 02 '20 at 08:08
  • @JayCroghan `scipy.misc.imsave()`'s signature was `scipy.misc.imsave(name, arr, format=None)`, so it does indeed take at least two parameters. – AKX Jun 02 '20 at 10:48
  • That's what the docs said, but in the project I downloaded from GitHub it' – Jay Croghan Jun 02 '20 at 10:49