【发布时间】:2018-07-02 03:04:09
【问题描述】:
我已经安装了 xgboost,它在我的 python 终端和我的 ipython 笔记本上都运行良好。但突然我开始在 ipython 笔记本上遇到问题。
当我在 ipython 中输入 xgb.DMatrix 时,我得到 module 'xgboost' has no attribute 'DMatrix',但在 python 终端上,我得到 <class 'xgboost.core.DMatrix'>。实际上,这些属性都没有在 ipython 上工作。
我已经尝试删除 xgboost 文件夹并重新下载,但问题仍然存在。
我不认为这是一个重复的问题,因为我已经提到过:
一个。它在 python 终端中工作正常,但在 ipython notebook 中却不行
b. OP 的问题仍未解决(AttributeError: module ‘xgboost’ has no attribute ‘XGBRegressor’)
【问题讨论】: