我使用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'
可能是什么情况?