Cannot Import SHAP in jupyter notebook. showing system error

129 Views Asked by At

After instaling SHAP using !pip install shap import shap the error shows:

SystemError Traceback (most recent call last) in ----> 1 import shap

F:\Anaconda\lib\site-packages\shap_init_.py in 10 warnings.warn("As of version 0.29.0 shap only supports Python 3 (not 2)!") 11 ---> 12 from ._explanation import Explanation, Cohorts 13 14 # explainers

F:\Anaconda\lib\site-packages\shap_explanation.py in 10 from slicer import Slicer, Alias, Obj 11 # from ._order import Order ---> 12 from .utils._general import OpChain 13 from .utils._exceptions import DimensionError 14

F:\Anaconda\lib\site-packages\shap\utils_init_.py in ----> 1 from ._clustering import hclust_ordering, partition_tree, partition_tree_shuffle, delta_minimization_order, hclust 2 from ._general import approximate_interactions, potential_interactions, sample, safe_isinstance, assert_import, record_import_error 3 from ._general import shapley_coefficients, convert_name, format_value, ordinal_str, OpChain, suppress_stderr 4 from ._show_progress import show_progress 5 from ._masked_model import MaskedModel, make_masks

F:\Anaconda\lib\site-packages\shap\utils_clustering.py in 2 import scipy as sp 3 from scipy.spatial.distance import pdist ----> 4 from numba import jit 5 import sklearn 6 import warnings

F:\Anaconda\lib\site-packages\numba_init_.py in 41 42 # Re-export vectorize decorators and the thread layer querying function ---> 43 from numba.np.ufunc import (vectorize, guvectorize, threading_layer, 44 get_num_threads, set_num_threads) 45

F:\Anaconda\lib\site-packages\numba\np\ufunc_init_.py in 1 # -- coding: utf-8 -- 2 ----> 3 from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize 4 from numba.np.ufunc._internal import PyUFunc_None, PyUFunc_Zero, PyUFunc_One 5 from numba.np.ufunc import _internal, array_exprs

F:\Anaconda\lib\site-packages\numba\np\ufunc\decorators.py in 1 import inspect 2 ----> 3 from numba.np.ufunc import _internal 4 from numba.np.ufunc.parallel import ParallelUFuncBuilder, ParallelGUFuncBuilder 5

SystemError: initialization of _internal failed without raising an exception

i tried updating my python environment, it did not work.

0

There are 0 best solutions below