【python】windows下安装xgboost的python库

傻瓜教程

主要参考了https://www.hongweipeng.com/index.php/archives/826/  和 https://github.com/dmlc/xgboost/issues/1049 

1. 下载编译器:https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.3.0/threads-win32/seh/

将其bin目录位置添加到系统环境变量path之后,并将bin目录下 mingw32-make.exe改名为make.exe,便于后面调用。

2. 下载git:https://git-scm.com/download/win

3. 打开 Git Bash 并选择一个下载位置,依次执行

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 dmlc-core
make -j4
cd ../rabit
make lib/librabit_empty -j4
cd ..
cp make/mingw64.mk config.mk
make -j4

进入文件夹 cd python-package

 python setup.py install

posted on 2016-10-09 13:24  yesuuu  阅读(1398)  评论(0编辑  收藏  举报

导航