我已经安装了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’)
,问题仍未得到解决