简体   繁体   中英

ModuleNotFoundError: No module named 'skimage.filters._sparse_cy'

when i use the fuction skimage.feature.greycomatrix, pycharm error: ModuleNotFoundError: No module named 'skimage.filters._sparse_cy' , the version of skimage: 0.18.1 Code:

from skimage.feature import greycomatrix, greycoprops
import cv2
img_org = cv2.imread('train_video/frame/tr_123.jpg')
result = skimage.feature.greycomatrix(img_org, [1], [0, np.pi/2], levels=4)

Output:

Traceback (most recent call last):
File "D:/thomas/py_code/test_4.py", line 7, in
from skimage.feature import greycomatrix, greycoprops
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\feature_init_.py", line 3, in
from .canny import canny
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\feature_canny.py", line 18, in
from ..filters import gaussian
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\filters_init.py", line 12, in
from .thresholding import (threshold_local, threshold_otsu, threshold_yen,
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\filters\thresholding.py", line 14, in
from ._sparse import correlate_sparse, _validate_window_size
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python37\lib\site-packages\skimage\filters_sparse.py", line 2, in
from ._sparse_cy import _correlate_sparse_offsets
ModuleNotFoundError: No module named 'skimage.filters._sparse_cy'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM