xgboost imported successfully, but I'm not able to import XGBClassifier.
Asked
Active
Viewed 4,520 times
5

karel
- 5,489
- 46
- 45
- 50

Yash Vichare
- 51
- 1
- 2
-
The commands work from the command line, but in Jupyter Notebook it gives the same error message. According to the [xgboost PyPI website](https://pypi.org/project/xgboost/) pip installation may not work on some environments, and it may cause unexpected errors. When pip installs xgboost it creates a new xgboost folder in a non-standard (i.e. unknown) location in the same parent directory as the bin directory. – karel Feb 15 '19 at 04:59
-
Can you tell if you are using any virtual environment ? if not, then I'd suggest you create a virtual environment and then install xgboost package in it before running jupyter notebook. – stud3nt Jan 16 '20 at 13:49
1 Answers
2
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.6a2
or 'conda install -c anaconda py-xgboost'
It will work fine after the installation.

Kumar Arnav
- 301
- 2
- 13
-
PackagesNotFoundError: The following packages are not available from current channels: - xgboost=0.6a2 – Mahlatse Sep 22 '21 at 11:38