Yash Vichare
Yash Vichare

Reputation: 51

ImportError: cannot import name 'XGBClassifier' from 'xgboost' (unknown location)

xgboost imported successfully, but I'm not able to import XGBClassifier.

Upvotes: 5

Views: 5152

Answers (1)

Kumar Arnav
Kumar Arnav

Reputation: 335

Check whether xgboost is properly installed or not. To install xgboost in anaconda distribution, you can run the following command in anaconda command-line console.

conda install -c conda-forge xgboost=0.6a2or 'conda install -c anaconda py-xgboost'

It will work fine after the installation.

Upvotes: 2

Related Questions