Note
Pre-built binary wheel for Python
If you are planning to use Python, consider installing XGBoost from a pre-built binary wheel, available from Python Package Index (PyPI). You may download and install it by running
# Ensure that you are downloading one of the following:
# * xgboost-{version}-py2.py3-none-manylinux1_x86_64.whl
# * xgboost-{version}-py2.py3-none-win_amd64.whl
pip3 install xgboost
The binary wheel will support GPU algorithms (gpu_hist) on machines with NVIDIA GPUs. Please note that training with multiple GPUs is only supported for Linux platform. See XGBoost GPU Support.
Currently, we provide binary wheels for 64-bit Linux and Windows.
Nightly builds are available. You can now run pip install https://s3-us-west-2.amazonaws.com/xgboost-nightly-builds/xgboost-[version]+[commit hash]-py2.py3-none-manylinux1_x86_64.whl to install the nightly build with the given commit hash. See this page to see the list of all nightly builds.
This page gives instructions on how to build and install XGBoost from scratch on various systems. It consists of two steps:
First build the shared library from the C++ codes (libxgboost.so
for Linux/OSX and xgboost.dll
for Windows).
(For R-package installation, please directly refer to R Package Installation.)
Then install the language packages (e.g. Python Package).
Note
Use of Git submodules
XGBoost uses Git submodules to manage dependencies. So when you clone the repo, remember to specify --recursive
option:
git clone --recursive https://github.com/dmlc/xgboost
For windows users who use github tools, you can open the git shell and type the following command:
git submodule init
git submodule update
Please refer to Trouble Shooting section first if you have any problem during installation. If the instructions do not work for you, please feel free to ask questions at the user forum.
Contents