Warm tip: This article is reproduced from stackoverflow.com, please click
python scikit-image

No module named 'skimage'

发布于 2020-11-25 15:41:37

I'm importing skimage in a python code.

from skimage.feature import greycomatrix, greycoprops

and I get this error

No module named 'skimage'

Although I've already installed the scikit-image. Can anyone help ?

This is the output of pip freeze

enter image description here

enter image description here

enter image description here

Questioner
Lilly
Viewed
2
Juan 2020-07-20 11:08

Since pip freeze indeed shows scikit-image as installed, I presume that you are launching your script/session using a different environment from the one listed by pip. You should make sure that you are in the same environment. Try python -m pip freeze and python my_script.py from the same terminal to make sure that you are comparing the same environment.

RealPython has a decent guide on Python environments here.