Search code examples
scikit-image

Can't importe scikit-image in python 3.7


I have successfully installed the package scikit-image in my python project. However, I can't seem to import it to my python code. It seems it has a problem with the hyphen in the package. I have tried to install skimage, but it pip does not want to install this package and suggest I should install scikit-image instead. Does anyone know how I can solve this problem?


Solution

  • To install:

    pip install scikit-image
    

    To check which version is installed:

    pip show scikit-image
    

    To use in Python:

    import skimage
    

    or, something more specific:

    from skimage.morphology import skeletonize
    

    If that doesn't work, run each of the following commands and paste the output into your question:

    which pip
    pip -V
    which python
    python -V