2
votes

I'm new to python. 'from scipy.misc import imread' gives me an 'ImportError' even I have Successfully installed Pillow.

--> pip install Pillow

Requirement already satisfied: Pillow in ***\lib\site-packages (6.0.0)

# -*- coding: utf-8 -*-
from PIL import Image
from wordcloud import WordCloud
from scipy.misc import imread

ImportError: cannot import name 'imread' from 'scipy.misc'

2

2 Answers

2
votes

This might be a version problem. I replaced scipy.misc with imageio.

`imread` is deprecated in SciPy 1.0.0, and will be removed in 1.2.0.
Use `imageio.imread` instead.
0
votes

If you installed Pillow with scipy, this will happen. try with installing scipy 1.1.0,

pip install scipy==1.1.0

this works for me.