Xgboost is widely used in Kaggle competitions. For those who prefer to use Windows, installing xgboost could be a painstaking process. Therefore I wrote this note to save your time.
To be fair, there is nothing wrong about the official guide for installing Xgboost on Windows. But still, I’d love to stress several points here.
git clone --recursive https://github.com/dmlc/xgboost cd xgboost wget https://www.dropbox.com/s/y8myex4bnuzcp03/Makefile_win?dl=1 cp Makefile_win Makefile cp make/mingw64.mk config.mk mingw32-make
Makefile_winis a modified version (thanks to Zhou Xiyou) of the original
Makefileto suit the building process on Windows. You can wget it or download it here.
- Be sure to use a UNIX shell because Windows CMD has issue with
mkdir -pcommand. Git Bash is recommended.
- Be sure to use
- Be sure to use a proper MinGW. TDM-GCC is recommended. Note that by default it wouldn’t install OpenMP for you. You need to specifiy it otherwise the building would fail.
This should be straightforward enough.
cd python-package python setup.py install