git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
make -j4
cd python-package
sudo python setup.py install
sudo apt-get install python-setuptools
export PYTHONPATH=~/xgboost/python-package
#test
python
>>import xgboost
>>
上面只支持CPU,有时候跑程序有点慢,可以试试GPU
GPU编译版
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
mkdir build
cd build
cmake .. -DPLUGIN_UPDATER_GPU=ON
make -j
cd python-package
sudo python setup.py install
sudo apt-get install python-setuptools
export PYTHONPATH=~/xgboost/python-package
#test
python
>>import xgboost
>>
http://xgboost.readthedocs.io/en/latest/build.html#python-package-installation