You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I cannot call any class in causalml after installation
To Reproduce
If I call one class in causalml, I will get the following errors:
from causalml.inference.tree import CausalTreeRegressor
Traceback (most recent call last):
Input In [3] in <cell line: 1>
from causalml.inference.tree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree_init_.py:1 in
from .causal.causaltree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal\causaltree.py:14 in
from causalml.inference.meta.utils import check_treatment_vector
File ~\Anaconda3\lib\site-packages\causalml\inference\meta_init_.py:1 in
from .slearner import LRSRegressor, BaseSLearner, BaseSRegressor, BaseSClassifier
File ~\Anaconda3\lib\site-packages\causalml\inference\meta\slearner.py:9 in
from causalml.inference.meta.base import BaseLearner
File ~\Anaconda3\lib\site-packages\causalml\inference\meta\base.py:6 in
from causalml.inference.meta.explainer import Explainer
File ~\Anaconda3\lib\site-packages\causalml\inference\meta\explainer.py:2 in
import shap
File ~\Anaconda3\lib\site-packages\shap_init_.py:5 in
from ._explanation import Explanation, Cohorts
File ~\Anaconda3\lib\site-packages\shap_explanation.py:13 in
from .utils._exceptions import DimensionError
File ~\Anaconda3\lib\site-packages\shap\utils_init_.py:1 in
from ._clustering import (
File ~\Anaconda3\lib\site-packages\shap\utils_clustering.py:7 in
from numba import njit
File ~\Anaconda3\lib\site-packages\numba_init_.py:200 in
_ensure_critical_deps()
File ~\Anaconda3\lib\site-packages\numba_init_.py:140 in _ensure_critical_deps
raise ImportError("Numba needs NumPy 1.21 or less")
ImportError: Numba needs NumPy 1.21 or less
Since I see this "ImportError: Numba needs NumPy 1.21 or less" ourpur, I try to use numpy version == 1.20.1. However, I face errors again as follows:
from causalml.inference.tree import CausalTreeRegressor
Traceback (most recent call last):
Input In [2] in <cell line: 1>
from causalml.inference.tree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree_init_.py:1 in
from .causal.causaltree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal\causaltree.py:15 in
from ._tree import BaseCausalDecisionTree
File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal_tree.py:16 in
from ._builder import DepthFirstCausalTreeBuilder, BestFirstCausalTreeBuilder
File causalml\inference\tree\causal_builder.pyx:1 in init causalml.inference.tree.causal._builder
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Environment (please complete the following information):
OS: [Windows]
Python Version: 3.9
Additional context
I am quite confused here. Please help me with this.
The text was updated successfully, but these errors were encountered:
Describe the bug
I cannot call any class in causalml after installation
To Reproduce
If I call one class in causalml, I will get the following errors:
from causalml.inference.tree import CausalTreeRegressor
Traceback (most recent call last):
Input In [3] in <cell line: 1>
from causalml.inference.tree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree_init_.py:1 in
from .causal.causaltree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal\causaltree.py:14 in
from causalml.inference.meta.utils import check_treatment_vector
File ~\Anaconda3\lib\site-packages\causalml\inference\meta_init_.py:1 in
from .slearner import LRSRegressor, BaseSLearner, BaseSRegressor, BaseSClassifier
File ~\Anaconda3\lib\site-packages\causalml\inference\meta\slearner.py:9 in
from causalml.inference.meta.base import BaseLearner
File ~\Anaconda3\lib\site-packages\causalml\inference\meta\base.py:6 in
from causalml.inference.meta.explainer import Explainer
File ~\Anaconda3\lib\site-packages\causalml\inference\meta\explainer.py:2 in
import shap
File ~\Anaconda3\lib\site-packages\shap_init_.py:5 in
from ._explanation import Explanation, Cohorts
File ~\Anaconda3\lib\site-packages\shap_explanation.py:13 in
from .utils._exceptions import DimensionError
File ~\Anaconda3\lib\site-packages\shap\utils_init_.py:1 in
from ._clustering import (
File ~\Anaconda3\lib\site-packages\shap\utils_clustering.py:7 in
from numba import njit
File ~\Anaconda3\lib\site-packages\numba_init_.py:200 in
_ensure_critical_deps()
File ~\Anaconda3\lib\site-packages\numba_init_.py:140 in _ensure_critical_deps
raise ImportError("Numba needs NumPy 1.21 or less")
ImportError: Numba needs NumPy 1.21 or less
Since I see this "ImportError: Numba needs NumPy 1.21 or less" ourpur, I try to use numpy version == 1.20.1. However, I face errors again as follows:
from causalml.inference.tree import CausalTreeRegressor
Traceback (most recent call last):
Input In [2] in <cell line: 1>
from causalml.inference.tree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree_init_.py:1 in
from .causal.causaltree import CausalTreeRegressor
File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal\causaltree.py:15 in
from ._tree import BaseCausalDecisionTree
File ~\Anaconda3\lib\site-packages\causalml\inference\tree\causal_tree.py:16 in
from ._builder import DepthFirstCausalTreeBuilder, BestFirstCausalTreeBuilder
File causalml\inference\tree\causal_builder.pyx:1 in init causalml.inference.tree.causal._builder
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Environment (please complete the following information):
Additional context
I am quite confused here. Please help me with this.
The text was updated successfully, but these errors were encountered: