I tried to install XGBoost package in python. I am using windows os, 64bits . I have gone through following.
The package directory states that xgboost is unstable for windows and is disabled: pip installation on windows is currently disabled for further invesigation, please install from github. https://pypi.python.org/pypi/xgboost/
I am not well versed in Visual Studio, facing problem building XGBoost. I am missing opportunities to utilize xgboost package in data science.
Please guide, so that I can import the XGBoost package in python.
Thanks
If you are using anaconda
(or miniconda
) you can use the following:
conda install -c anaconda py-xgboost
UPDATED 2019-09-20
rapidsai/py-xgboost
UPDATED 2021-12-07
Check install by:
conda list
To activate an environment:
On Windows, in your Anaconda Prompt, run (assumes your environment is named myenv
):
activate myenv
On macOS and Linux, in your Terminal Window, run (assumes your environment is named myenv
):
source activate myenv
Conda prepends the path name myenv onto your system command.
Build it from here:
You first need to build the library through "make", then you can install using anaconda prompt (if you want it on anaconda) or git bash (if you use it in Python only).
First follow the official guide with the following procedure (in Git Bash on Windows):
git clone --recursive https://github.com/dmlc/xgboost
git submodule init
git submodule update
then install TDM-GCC here and do the following in Git Bash:
alias make='mingw32-make'
cp make/mingw64.mk config.mk; make -j4
Last, do the following using anaconda prompt or Git Bash:
cd xgboost\python-package
python setup.py install
Also refer to these great resources:
Official Guide
Installing Xgboost on Windows
Installing XGBoost For Anaconda on Windows
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With