Lilly
Lilly

Reputation: 55

No module named 'skimage'

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

Upvotes: 1

Views: 2087

Answers (3)

Juan
Juan

Reputation: 5738

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.

Upvotes: 3

exciteabletom
exciteabletom

Reputation: 471

If you are using python3 you should install the package using python3 -m pip install package_name or pip3 install package_name

Using the pip binary will install the package for python2 on some systems.

Upvotes: 0

Laraib Sid
Laraib Sid

Reputation: 36

You can use pip install scikit-image.

Also, see the recommended procedure.

Upvotes: 1

Related Questions