AttributeError:模块'lightgbm'没有属性'LGBMClassifier'

时间:2017-06-15 13:56:50

标签: lightgbm

我使用conda install -c creditx lightgbm=0.2.0安装了lightgbm,并导入了lightgbm成功,但是当我导入LGBMClassifier或使用LGBMClassifier时,它失败了。

错误是:

<module 'posixpath' from '/usr/anaconda3/lib/python3.5/posixpath.py'>
Traceback (most recent call last):
  File "/root/Final_Contest/ligGBM.py", line 12, in <module>
    gbm = lgb.LGBMClassifier(objective='binary',num_leaves=31,learning_rate=0.1,n_estimators=3000)
AttributeError: module 'lightgbm' has no attribute 'LGBMClassifier'

可能是什么情况?

0 个答案:

没有答案