How to install xgboost package in python (windows platform)?

In case anyone’s looking for a simpler solution that doesn’t require compiling it yourself:

  1. download xgboost whl file from here (make sure to match your python version and system architecture, e.g. “xgboost-0.6-cp35-cp35m-win_amd64.whl” for python 3.5 on 64-bit machine)
  2. open command prompt
  3. cd to your Downloads folder (or wherever you saved the whl file)
  4. pip install xgboost-0.6-cp35-cp35m-win_amd64.whl (or whatever your whl file is named)

If you find it won’t install because of a missing dependency, download and install the dependency first and retry.

If it complains about access permissions, try opening your command prompt as Administrator and retry.

This gives you xgboost and the scikit-learn wrapper, and saves you from having to go through the pain of compiling it yourself. 🙂

Leave a Comment