我们需要pip来安装xgboost
这个时候有可能会报如下错误:
这时候需要安装setuptools
执行完这步骤,再回到pip目录下执行安装命令即可。
一切正常
显示出安装目录:
Requirement already satisfied (use --upgrade to upgrade): xgboost in /usr/local/python27/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/python27/lib/python2.7/site-packages (from xgboost)
Requirement already satisfied (use --upgrade to upgrade): scipy in /usr/local/python27/lib/python2.7/site-packages (from xgboost)
或者更简单一些
python get-pip.py
pip install xgboost