3

I am a newbie to Python and working on a small opencv application. I need local_threshold from scikit-image but getting below error :

Traceback (most recent call last): File "D:/Projects/Python/Document_Scanner/main.py", line 6, in from skimage.filters import threshold_local File "C:\Users\nash2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\skimage\filters_init_.py", line 4, in from .edges import (sobel, sobel_h, sobel_v, File "C:\Users\nash2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\skimage\filters\edges.py", line 18, in from ..restoration.uft import laplacian File "C:\Users\nash2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\skimage\restoration_init_.py", line 13, in from .rolling_ball import rolling_ball, ball_kernel, ellipsoid_kernel File "C:\Users\nash2\AppData\Local\Programs\Python\Python38-32\lib\site-packages\skimage\restoration\rolling_ball.py", line 3, in from ._rolling_ball_cy import apply_kernel, apply_kernel_nan ImportError: DLL load failed while importing _rolling_ball_cy: The specified module could not be found.

I tried reverting to older version of scikit-image , but still getting error. My current version of scikit-image is 0.18.0

Avinash
  • 313
  • 1
  • 5
  • 14
  • How did you install Python and scikit-image? You certainly still have version 0.18.0 if you are getting the error. – Juan Jan 13 '21 at 01:43
  • I am using pycharm and have tried installing scikit-image by pip as well as by resolving unfound dependency in IDE. – Avinash Jan 13 '21 at 03:38
  • Python was installed way back and I never got such error previously. – Avinash Jan 13 '21 at 03:39
  • You mentioned you "tried reverting". If you are getting the error, reverting did not work. You should make sure when you use pip that you are in the same environment that you are using with PyCharm (settings > set python interpreter). – Juan Jan 14 '21 at 00:25

5 Answers5

5

Installing the old version (0.18.0rc0 version) of scikit-image I solved this problem

2

You need to install and distribute the contents of Microsoft's vcredist_x64.exe. In particular you need VCOMP140.DLL.

wedesoft
  • 2,781
  • 28
  • 25
1

You need to install the scikit-image 0.18.0rc0 package. To install this package run the command below.

pip install scikit-image==0.18.0rc0

Note - This also takes care of any previously installed versions of it by removing it and installing the specified version. If there is any problem with the installation, try running the command in an administrator terminal window.

Kshitij Agarwal
  • 2,060
  • 2
  • 8
  • 16
0

I was able to get it work by reinstalling python on my machine. Hope it helps somebody.

Avinash
  • 313
  • 1
  • 5
  • 14
0

I reinstalled scikit-image using version 0.21.0 and it worked.

pip install scikit-image==0.21.0