AttributeError while running Scipy.ndimages.imread

when running:

import scipy
scipy.ndimage.imread('path/to/image',mode='RGB')

I got

AttributeError: module 'scipy.ndimage' has no attribute 'imread'

I already tried to uninstall and reinstall scipy and also to reinstall Pillow and numpy as said there

Is there some missing module?


Solution 1:

I came across this issue today as well. This happens because scipy.ndimage.imread is deprecated, see doc here.

To do the same, you can to use the imageio package

conda install -c conda-forge imageio

After this, you can do

import imageio
imageio.imread('path/to/image',mode='RGB')