Linux下安装xgBoost

来源:互联网 发布:java报表工具 编辑:程序博客网 时间:2024/06/06 00:37

http://xgboost.readthedocs.org/en/latest/build.html#python-package-installation

分两步:

  1. First build the shared library from the C++ codes (libxgboost.so for linux/osx andlibxgboost.dll for windows).
    • Exception: for R-package installation please directly refer to the R package section.
  2. Then install the language packages (e.g. Python Package).


0)安装git:

sudo apt-get install git


1)安装xgboost:

git clone --recursive https://github.com/dmlc/xgboost
如果是未联网的机器,先去https://github.com/dmlc/xgboost下载源码,再手动传到服务器,解压缩等

1)build:

cd xgboost; make -j4
如果是新机器,发现g++ not found错误:sudo apt-get install g++,再make。


2)

sudo apt-get install python-setuptools

cd python-package; 
sudo python setup.py install
export PYTHONPATH=~/xgboost/python-package


2 0
原创粉丝点击