系統環境: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