windows下安装xgboost

前提:64位windows下安装numpy和scipy

1、下载安装Windows的tdm-gcc编译器,选择64位,安装时勾选gcc下复选框openmp,如下图。安装好后配置环境变量,Path=C:\TDM-GCC-64\bin,(根据自己的安装路径),为了方便可以将安装后文件中mingw32-make.exe改名为make,在cmd中输入make,当返回“make: *** No targets specified and no makefile found.  Stop.”即为安装成功

gcc下载地址:http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-5.1.0-2.exe/download


2、下载安装git。git下载地址:https://git-scm.com/download/win 

3、打开git bash 输入以下命令,编辑xgboost。

cd c:

git clone --recursive https://github.com/dmlc/xgboost

cd xgboost

git submodule init

git submodule update

cp make/mingw64.mk config.mk

make -j4

cd python-package

python setup.py install

4、现在xgboost安装成功