<p>首先需要通过“make”构建库,然后可以使用anaconda prompt(如果希望在anaconda上使用)或git bash(如果只在Python中使用)进行安装。</p>
<p>首先<a href="http://xgboost.readthedocs.org/en/latest/build.html#building-on-windows" rel="nofollow">follow the official guide</a>执行以下过程(在Windows上的Git Bash中):</p>
<pre><code>git clone --recursive https://github.com/dmlc/xgboost
git submodule init
git submodule update
</code></pre>
<p>然后<a href="http://tdm-gcc.tdragon.net/download" rel="nofollow">install TDM-GCC here</a>在Git Bash中执行以下操作:</p>
<pre><code>alias make='mingw32-make'
cp make/mingw64.mk config.mk; make -j4
</code></pre>
<p>最后,使用anaconda prompt或Git Bash执行以下操作:</p>
<pre><code>cd xgboost\python-package
python setup.py install
</code></pre>
<p>也可参考这些伟大的资源:</p>
<p><a href="http://xgboost.readthedocs.org/en/latest/build.html" rel="nofollow">Official Guide</a></p>
<p><a href="https://dnc1994.com/2016/03/installing-xgboost-on-windows/" rel="nofollow">Installing Xgboost on Windows</a></p>
<p><a href="https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en" rel="nofollow">Installing XGBoost For Anaconda on Windows</a></p>