- 安裝git,下載鏈接git for windows
- 安裝mingw64,下載鏈接mingw64安裝過程中Architecture 選擇x86_64,其他值默認
直接在計算機中配置環境變量,添加名爲PATH的環境變量,值爲mingw64文件地址\bin\ - 打開git bash,輸入以下命令
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
alias make='mingw32-make'
cp make/mingw64.mk config.mk; make -j4
cd python-package/
python setup.py install
判斷xgboost是否成功安裝:
import xgboost as xgb
成功導入後,基本就沒有問題了。