Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: cannot import name 'rgb2gray' from 'skimage.color'

When I try:

>>> from skimage import io

I get at the end the following:

from ..color import rgb2gray
ImportError: cannot import name 'rgb2gray' from 'skimage.color' (C:\Users\user\A
ppData\Local\Programs\Python\Python37-32\lib\site-packages\skimage\color\__init_
_.py)

Although I have installed the packages: matplotlib, scipy, pillow, numpy and six

How can I fix it? Any help would be appreciated

like image 812
Safiya Avatar asked Jan 01 '23 21:01

Safiya


1 Answers

In case you run into this error from inside a Jupyter Notebook, try restarting the kernel as suggested in this GitHub issue.

That solved the problem for me.

like image 152
Thomas Avatar answered Jan 09 '23 19:01

Thomas