xgboost无法在ipython笔记本中导入属性

时间:2018-01-23 10:19:35

标签: python xgboost

我已经安装了xgboost,它在我的python终端和我的ipython笔记本上都运行良好。但突然间,我开始在ipython笔记本上遇到问题。 当我输入xgb.DMatrix时,我在ipython中得到module 'xgboost' has no attribute 'DMatrix'但是在python终端上我得到<class 'xgboost.core.DMatrix'>。实际上没有任何一个属于ipython。

我已经尝试删除xgboost文件夹并重新加载它,但问题仍然存在。

我不认为这是一个重复的问题,正如我所提到的那样:

一个。它在python终端中工作正常,但在ipython笔记本中却没有。

湾对于OP(AttributeError: module ‘xgboost’ has no attribute ‘XGBRegressor’

,问题仍未得到解决

1 个答案:

答案 0 :(得分:0)

我通过删除xgboost文件夹并根据此post

重新安装它来解决了这个问题