ImportError: DLL load failed while importing _rolling_ball_cy:

Viewed 3612

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

4 Answers

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

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

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.

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

Related