Note that as of the most recent release the Microsoft Visual Studio instructions no longer seem to apply as this link returns a 404 error:

https://github.com/dmlc/xgboost/tree/master/windows

You can read more about the removal of the MSVC build from Tianqi Chen's comment here.

So here's what I did to finish a 64-bit build on Windows:

  1. Download and install MinGW-64: http://sourceforge.net/projects/mingw-w64/
  2. On the first screen of the install prompt make sure you set the Architecture to x86_64 and the Threads to win32
  3. I installed to C:\mingw64 (to avoid spaces in the file path) so I added this to my PATH environment variable: C:\mingw64\mingw64\bin
  4. I also noticed that the make utility that is included in bin\mingw64 is called mingw32-make so to simplify things I just renamed this to make
  5. Open a Windows command prompt and type gcc. You should see something like "fatal error: no input file"
  6. Next type make. You should see something like "No targets specified and no makefile found"
  7. Type git. If you don't have git, install it and add it to your PATH.

These should be all the tools you need to build the xgboost project. To get the source code run these lines:

  1. cd c:\
  2. git clone --recursive https://github.com/dmlc/xgboost
  3. cd xgboost
  4. git submodule init
  5. git submodule update
  6. cp make/mingw64.mk config.mk
  7. make -j4

Note that I ran this part from a Cygwin shell. If you are using the Windows command prompt you should be able to change cp to copy and arrive at the same result. However, if the build fails on you for any reason I would recommend trying again using cygwin.

If the build finishes successfully, you should have a file called xgboost.exe located in the project root. To install the Python package, do the following:

  1. cd python-package
  2. python setup.py install

Now you should be good to go. Open up Python, and you can import the package with:

import xgboost as xgb

To test the installation, I went ahead and ran the basic_walkthrough.py file that was included in the demo/guide-python folder of the project and didn't get any errors.

REF.

[1] http://stackoverflow.com/questions/33749735/how-to-install-xgboost-package-in-python-windows-platform/41274589#

windows下安装xgboost的更多相关文章

  1. 【python】windows下安装xgboost的python库

    傻瓜教程 主要参考了https://www.hongweipeng.com/index.php/archives/826/  和 https://github.com/dmlc/xgboost/iss ...

  2. 最新xgboost python32位下安装xgboost

    网上很多windows python下安装xgboost都是很简单的几步无非是visual studio2013以上版本编译,安装.但现在最新的xgboost已经移除了c++工程文件,找到旧版本的也多 ...

  3. 在Window平台下安装xgboost的Python版本

    原文:http://blog.csdn.net/pengyulong/article/details/50515916 原文修改了两个地方才安装成功,第3步可以不用,第2步重新生成所有的就行了. 第4 ...

  4. 在windows下安装gulp —— 基于 Gulp 的前端集成解决方案(一)

    相关连接导航 在windows下安装gulp —— 基于 Gulp 的前端集成解决方案(一) 执行 $Gulp 时发生了什么 —— 基于 Gulp 的前端集成解决方案(二) 常用 Gulp 插件汇总 ...

  5. Windows 下安装 MongoDB

    Windows 下安装 MongoDB 的步骤:1.官网www.mongodb.com下载安装包或zip包2.解压下载的文件到文件夹 D:\mongo .3.使用管理员权限打开CMD,导航到目录 D: ...

  6. Coreseek Windows下安装调试

    由于项目需要全文检索,后面就去网上查了下资料,找到了Sphinx[中文是狮身人面像]这个全文检索引擎,听说挺好用的,不过没有中文分词.后面又去找了一下,找到了Coreseek,一款中文全文检索/搜索软 ...

  7. 从零开始学 Java - Windows 下安装 Tomcat

    谁都想分一杯羹 没有一个人是真正的无私到伟大的,我们试着说着做自己,与人为善,世界和平!殊不知,他们的真实目的当你知道后,你会被恶心到直摇头并下意识地迅速跑开,下辈子都不想见到他.不过,他没错,你也没 ...

  8. 从零开始学 Java - Windows 下安装 JDK

    关于未来 "我要死在火星.在我死去的时候能够想着人类能有一个美好的未来--有可持续的能源,同时能够殖民其他的星球来避免人类灭绝的最坏可能." 官网下载 直接打开官网:http:// ...

  9. windows下安装nginx

    说起开发,自己感到非常惭愧,由于公司让我给<绿电侠>项目写整体架构解决方案,才开始接触nginx这个东东,突然觉得它是一把非常好的利器. 本文主要记录在windows下安装nginx,另参 ...

随机推荐

  1. Excel 导入 Sql Server出错——“文本被截断,或者一个或多个字符在目标代码页中没有匹配项”错误的解决

    有人说应该先转成Access, 再转到Sql Server. 其实用处并不大, 要截断的还是被截断了. 原因是,SQL Server的导入导出为了确定数据表的字段类型,取excel文件的前8行来判别. ...

  2. Myeclipse中导入新项目报叹号

    Myeclipse中导入新项目报红色叹号 原因是导入项目中,有的jar路径不对, 在上图中,先把报错的jar移除,之后将JRE开头的那个library移除,最后点击add Library,选择jre. ...

  3. Python::re 模块 -- 在Python中使用正则表达式

    前言 这篇文章,并不是对正则表达式的介绍,而是对Python中如何结合re模块使用正则表达式的介绍.文章的侧重点是如何使用re模块在Python语言中使用正则表达式,对于Python表达式的语法和详细 ...

  4. Mac MySQL 转移 datadir

    mysql默认的datadir在启动盘上面,有时database太大,于是决定将datadir迁到存储盘中 Step 1 将原datadir迁到存储盘 mv /usr/local/var/mysql ...

  5. PP生产订单创建、下达、报工、收货、投料

    转自http://blog.sina.com.cn/s/blog_69fb8eb60102vpjd.html SAP 物料订单创建.下达.报工.收货与投料(ABAP代码) (2015-06-03 22 ...

  6. TCP SYN扫描学习笔记

    1.TCP SYN包扫描主机状态的原理:tcp协议规定,当目标主机收到一个tcp syn 包时,若目标主机处于开放状态,会返回给源主机一个tcp ack 包(目的端口开放),或者向源主机发送一个tcp ...

  7. pyodbc不支持使用%,应该使用?

    pyodbc不支持使用%,应该使用? 如: Sql插入语句cur.execute("INSERT INTO bb VALUES (?,?,?)","s",&qu ...

  8. 如何制作快速加载的HTML页面

    整理出来的tip 减小页面的大小 在页面下载中,页面的大小至今扮演着非常重要的因素. 减小页面的大小能够通过排除不必要空格,注释,动态内嵌脚本,和放入外部文件的 CSS 等在页面结构中很小的改变都能够 ...

  9. 最短路径问题——floyd算法

    floyd算法和之前讲的bellman算法.dijkstra算法最大的不同在于它所处理的终于不再是单源问题了,floyd可以解决任何点到点之间的最短路径问题,个人觉得floyd是最简单最好用的一种算法 ...

  10. h5移动端-1

    iphone3 : 设备分辨率 : 320*480 屏幕分辨率 : 320*480 iphone4 : 设备分辨率 : 320*480 屏幕分辨率 : 640*960 iphone5 : 设备分辨率 ...