安装 xgboost 库

1、下载网址

https://www.lfd.uci.edu/~gohlke/pythonlibs

2、CTRL+F 查找 xgboost
安装 xgboost 库
3、单击 xgboost,找到如下页面:
安装 xgboost 库
4、查询Python版本

在cmd下输入:python
返回Python的版本:Python 3.5.2 |Anaconda 4.2.0 (64-bit)|

5、根据Python版本下载安装包

xgboost‑0.80‑cp35‑cp35m‑win_amd64.whl
cp:是python的版本,cp35表示版本3.5

6、复制文件的路径+文件名

笔者下载到了桌面
C:\Users\Gorde\Desktop\xgboost-0.80-cp35-cp35m- win_amd64.whl

7、在cmd模式下安装

pip install C:\Users\Gorde\Desktop\xgboost-0.80-cp35-cp35m-win_amd64.whl

安装 xgboost 库
安装成功截图

8、有时候需要升级pip

安装xgboost时会报以下错误:

安装 xgboost 库

直接运行命令:python -m pip install --upgrade pip
安装 xgboost 库

成功后再安装xgboost即可。