Installing xgboost on Windows

After a consecutive trial-and-fails, I figured out a most direct way to install xgboost on Windows with MSVC; that is, you only have to download the latest RELEASE of xgboost on GitHub.

Then download the zipped archive — even with no need of git . After that, just as what can be found from web search, unzip the package, open the solution \windows\xgboost.sln in MSVC, compile the project  xgboost_wrapper (switch build profile to RELEASE, of course). Finally, copy the freshly-built  gboost_wrapper.dll to the folder \wrappers\ and the installation is ready now.

For Python, you can install the package by running  \python-package\setup.py . Remember to use install parameter.

As for R… Frankly I haven’t tried it out but… Maybe it’s the same story.

All in all, IMO, do not clone the latest commit using git . First of all, the latest commit doesn’t support MSVC building. Virtually tqchen has removed \windows\ directory in the latest commit (see  #736). After switching to Min-GW, I just couldn’t successfully compile rabit . Later I switched to mingw32-make in Cygwin, but came across compilation errors due to some ill-behaved macro definitions. (see #625)

So, after a day’s time, finally I decided to give up hacking makefile, and compromise myself to MSVC 🙄

Leave a Reply

Your email address will not be published. Required fields are marked *

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Content is available under CC BY-SA 3.0 unless otherwise noted.