marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.64k stars 1.81k forks source link

ImportError: cannot import name 'QhullError' from 'scipy.spatial'.... #724

Open Anan5a opened 1 year ago

Anan5a commented 1 year ago

Full Error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[9], line 2
      1 from lime import lime_image
----> 2 from skimage.segmentation import mark_boundaries

File /opt/conda/lib/python3.10/site-packages/skimage/segmentation/__init__.py:7
      5 from .slic_superpixels import slic
      6 from ._quickshift import quickshift
----> 7 from .boundaries import find_boundaries, mark_boundaries
      8 from ._clear_border import clear_border
      9 from ._join import join_segmentations, relabel_sequential

File /opt/conda/lib/python3.10/site-packages/skimage/segmentation/boundaries.py:5
      2 from scipy import ndimage as ndi
      4 from .._shared.utils import _supported_float_type
----> 5 from ..morphology import dilation, erosion, square
      6 from ..util import img_as_float, view_as_windows
      7 from ..color import gray2rgb

File /opt/conda/lib/python3.10/site-packages/skimage/morphology/__init__.py:12
     10 from ..measure._label import label
     11 from ._skeletonize import medial_axis, skeletonize, skeletonize_3d, thin
---> 12 from .convex_hull import convex_hull_image, convex_hull_object
     13 from .grayreconstruct import reconstruction
     14 from .misc import remove_small_holes, remove_small_objects

File /opt/conda/lib/python3.10/site-packages/skimage/morphology/convex_hull.py:4
      2 from itertools import product
      3 import numpy as np
----> 4 from scipy.spatial import ConvexHull, QhullError
      5 from ..measure.pnpoly import grid_points_in_poly
      6 from ._convex_hull import possible_hull

ImportError: cannot import name 'QhullError' from 'scipy.spatial' (/opt/conda/lib/python3.10/site-packages/scipy/spatial/__init__.py)

This also happen when I try to import from skimage.segmentation import mark_boundaries

Package versions:

scikit-image                             0.21.0
scikit-learn                             1.2.2
scikit-learn-intelex                     2023.1.1
scikit-multilearn                        0.2.0
scikit-optimize                          0.9.0
scikit-plot                              0.3.7
scikit-surprise                          1.1.3
scipy                                    1.11.1