安装xgboost
2017-12-12 14:18
295 查看
官方教程:http://xgboost.readthedocs.io/en/latest/get_started/index.html
一、安装库:
1.Linux系统
git clone --recursive https://github.com/dmlc/xgboost cd xgboost; make -j4
2.Windows 系统(官方方法)
首先到github官网下载git bash
然后下载库:
git clone --recursive https://github.com/dmlc/xgboost
git submodule init
git submodule update
XGBoost 编译支持 MSVC or MinGW.
git bash 使用MINGW64 在MinGW中 make命令使用mingw32-make,将如下命令添加到
.bashrc文件中
alias make='mingw32-make'
编译
cp make/mingw64.mk config.mk; make -j4
如果使用MSVC编译,使用VS2013,MSVC 12 64 bit generator.
mkdir build cd build cmake .. -G"Visual Studio 12 2013 Win64"
将编译后的 libxgboost.dll 复制到 python-package\xgboost
问题:
1.make命令不存在
是因为mingw32-make 没有安装
https://sourceforge.net/projects/mingw-w64/?source=typ_redirect安装MinGW-w64我是64位机器,所以安装64bit
安装完成后将安装路径C:\Program Files\mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\bin添加到环境变量中
关闭 git bash然后再打开就可以看到mingw32-make安装成功
2.官方可能安装不成功
使用如下编译过程:
cp make/mingw64.mk config.mk cp make/mingw64.mk dmlc-core/config.mk cd rabit make lib/librabit_empty.a -j4 cd ../dmlc-core make -j4 cd.. make -j4
安装:
cd python-package
python setup.py install import os os.environ['PATH'] = os.environ['PATH'] + ';C:\\Program Files\\mingw-w64\\x86_64-5.3.0-posix-seh-rt_v4-rev0\\mingw64\\bin' Windows最简单更新方法:https://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost下载whl文件用pip 安装
相关文章推荐
- Windows下安装xgboost详解;
- centos6 安装 xgboost0.6
- win10+python3安装Xgboost
- xgboost的用法安装
- 关于xgboost安装在anaconda上面(python3.6,64位,windows10)
- centos6安装xgboost0.6
- windows(64位)下xgboost的安装
- python安装xgboost (win7+anaconda 1.6.9+ python 3.6(64位))
- Windows下安装python版的XGBoost教程(基于Anaconda)
- 在Window平台下安装xgboost的Python版本
- windows下python安装xgboost
- Ubuntu 16.04安装CUDA9+Docker CE+NVIDIA-Docker+TensorFlow/XGBoost
- Win10(64位)python3.6 xgboost 详细安装教程(极速版)
- Windows7,python3安装xgboost
- 64位win10下安装xgboost python包的教程
- ubuntu16.04 64位 cpu安装tensorflow+theano+keras+caffe+xgboost
- win7 64 python2 xgboost安装
- windows安装python和xgboost
- Ubuntu16.04 安装xgboost(anaconda3)
- win10(64位)python xgboost 详细安装教程