系统环境:python
Windows10 64bit Anaconda4 Python3.5.1 git
软件安装:github
安装步骤:windows
$ cd /d/XGBoost/
$ git clone --recursive https://github.com/dmlc/xgboost $ cd xgboost $ git submodule init $ git submodule update
$ which mingw32-make
正常的返回结果应该是这样:ui
/c/Program Files/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/mingw32-make
为了方便,咱们更改一下名称:spa
$ alias make='mingw32-make'
$ cd /c/XGBoost/xgboost
$ cd dmlc-core $ make -j4 $ cd ../rabit $ make lib/librabit_empty.a -j4 $ cd .. $ cp make/mingw64.mk config.mk $ make -j4
cd d:\XGBoost\xgboost\python-package
d:\XGBoost\xgboost\python-package>python setup.py install
import os mingw_path = 'C:\\Program Files\\mingw-w64\\x86_64-5.3.0-posix-seh-rt_v4-rev0\\mingw64\\bin' os.environ['PATH'] = mingw_path + ';' + os.environ['PATH']
这一步完成以后全部的安装就都完成了,能够正常导入使用了。祝你们生活愉快!.net