0

I am stuck on this installation of scikit-image (aka skimage). I tried multiple ways:

  • Installation from a git hub folder (using the requirements.txt)
  • Installation from a whl file
  • Installation with pip install scikit-image

All three trials failed during the import: import skimage

ImportError: cannot import name 'geometry'
It seems that scikit-image has not been built correctly.

Your install of scikit-image appears to be broken.
Try re-installing the package following the instructions at:
https://scikit-image.org/docs/stable/install.html 

I went through internet but did not find solutions besides the ones above. Does anyone went through that before? One possibility seems to be to pip install with -egg, but I found that for Mac rather than Windows.

EDIT:

Hi everyone, so I found a solution but this is kind of very hard and I still don't understand why it did not work before.

I just:

  • uninstall anaconda
  • uninstall python
  • install python (3.8)
  • install Anaconda (I have trouble with Spyder now^^)
totalMongot
  • 194
  • 8
  • If there isn't a specific requirement to use above methods you can easily use `Anaconda` to install skimage. – B200011011 Jan 15 '20 at 06:21
  • @B200011011 You mean installing Anaconda and scikit image will come along? I learnt that method after asking the question, but now that I uninstalled and reinstalled I have trouble putting Anaconda at work – totalMongot Jan 15 '20 at 16:13
  • Please check if my answer below helps. – B200011011 Jan 16 '20 at 00:30

1 Answers1

0

If you want to code for computer vision/Image processing/machine learning tasks, then it can be done in pycharm with conda environment very easily. There is no need to install python separately to run Anaconda.

First, download and install pycharm. Next, If you use windows then download Anaconda 64 bit python 3.7 version from here, https://www.anaconda.com/distribution/#windows

You can find some details about managing environment and helpful links here, How to create some environments for tensorflow in anaconda?

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

Create a conda environment first using Anaconda Prompt command line,

conda create -n cvenv python=3.7

Now activate that environment using. By default base is activated.

conda activate cvenv

Next, install the packages you want,

conda install -c conda-forge scikit-learn
conda install -c conda-forge scikit-image
conda install -c conda-forge pillow
conda install -c conda-forge opencv

I use conda-forge packages as they are more recent. Finally, open pycharm and create a new project by selecting existing python interpreter in conda environment. If none exists then select,

Browse > Add Python Interpreter > Conda Environment > Interpreter > Browse > Anaconda3 installation folder > envs folder > cvenv folder > Python.exe 

You can test by creating a python file and writing import skimage.

B200011011
  • 3,798
  • 22
  • 33