ModuleNotFoundError:没有名为“ sklearn.tree._criterion”的模块

时间:2019-02-28 17:53:29

标签: python scikit-learn

我能够在jupyter笔记本上导入sklearn。但是,当我尝试导入“ DecisionTreeClassifier”时,遇到“ ModuleNotFoundError:没有名为'sklearn.tree._criterion'的模块”错误

代码:

from sklearn.tree import DecisionTreeClassifier

错误消息:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-462-f146622b3284> in <module>()
----> 1 from sklearn.tree import DecisionTreeClassifier

~\Anaconda3\lib\site-packages\sklearn\tree\__init__.py in <module>()
      4 """
      5 
----> 6 from .tree import DecisionTreeClassifier
      7 from .tree import DecisionTreeRegressor
      8 from .tree import ExtraTreeClassifier

~\Anaconda3\lib\site-packages\sklearn\tree\tree.py in <module>()
     38 from ..utils.validation import check_is_fitted
     39 
---> 40 from ._criterion import Criterion
     41 from ._splitter import Splitter
     42 from ._tree import DepthFirstTreeBuilder

ModuleNotFoundError: No module named 'sklearn.tree._criterion'

任何帮助都将不胜感激!

0 个答案:

没有答案