Installing XGBoost on Mac OSX
0. Get gcc with open mp. Just paste and execute the following command in your terminal, once Homebrew installation is completed.
1. xinpingdeMacBook-Pro:anaconda xinpingbao$ git clone --recursive https://github.com/dmlc/xgboost
2. xinpingdeMacBook-Pro:anaconda xinpingbao$ cd ./xgboost
3. Then open make/config.mk and uncomment these two lines
4. cd xgboost; cp make/minimum.mk ./config.mk; make -j4 注: 可以直接修改config.mk {1. export CC = gcc 去#,export CXX = g++ 去#,
} 5. We then build with the following commands.
6. Once the build is finished, we can use XGBoost with its command line. I am using Python, hence I performed this final step. You may need to enter the admin password to execute it.
|
在Mac os下安装xgboost
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/minimum.mk ./config.mk; make -j4
这是不支持多线程版本的,如果想要支持多线程,那么就要使用如下指令:
brew install gcc --without-multilib
brew相当于在Linux中的yum或者apt-get,可以到这里 下载,也可以使用如下命令:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安装brew命令
然后执行命令
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost; cp make/config.mk ./config.mk; make -j4
有时候也会出现错误:
clang: error: : errorunsupported option '-fopenmp'
可以参考这里 :
首先
ls /usr/local/bin/*
找到其中的gcc g++,然后
将./config.mk中的
$ export CC=/usr/local/bin/gcc-6
$ export CC=/usr/local/bin/g++-6
之后,重新 make -j4即可。
如果是利用python调用,那么还需要
cd python-package; sudo python setup.py install
即可安装完成。
Installing XGBoost on Mac OSX的更多相关文章
- Installing Hadoop on Mac OSX Yosemite Tutorial Part 1.
Installing Hadoop on Mac OSX Yosemite Tutorial Part 1. September 23, 2014 Marek 68 Comments Install ...
- 如何在Mac OSX上安装xgboost
听说xgboost效果很不错,于是准备学习下,但是发现大多数资料都是在讲如何在windows或linux下安装xgboost,而且照着官方文档也没有正确的安装好多线程的xgboost.最后还是从the ...
- Install Ansible on Mac OSX
from: https://devopsu.com/guides/ansible-mac-osx.html and : https://devopsu.com/guides/ansible-post- ...
- Setup Tensorflow with GPU on Mac OSX 10.11
Setup Tensorflow with GPU on OSX 10.11 环境描述 电脑:MacBook Pro 15.6 CPU: 2.7GHz 显卡: GT 650m 系统:OSX 10.11 ...
- 在OSX狮子(Lion)上安装MYSQL(Install MySQL on Mac OSX)
这篇文章简述了在Mac OSX狮子(Lion)上安装MySQL Community Server最新版本v10.6.7的过程. MySQL是最流行的开源数据库管理系统.首先,从MySQL的下载页面上下 ...
- Mac OSX 安装qemu
参考: Installing QEMU on OS X Homebrew Mac OSX 安装qemu 1.Install Homebrew: /usr/bin/ruby -e "$(cur ...
- mac osx下django-admin.py出现的问题
mac osx 下面用django-admin.py创建项目的时候,没创建成功出现django-admin.py编辑文件,这主要的原因是mac osx下面django-admin.py被重命名为dja ...
- mac osx 上面部署Django项目 apache+mysql+mod_wsgi
1.安装Xcode command line tools 首先,编译mysql和Homebrew需要用到Xcode command line tools,所以首先安装command line tool ...
- Webstorm 10 for mac osx 注册机,序列号,kegen
小菜最近get到mac体验机会,早就耳闻mac非常适合做开发,于是迫不及待的安装各种开发工具,不知不觉,轮到前端开发神器webstorm了,看了一下官网的价格,心拔凉拔凉的. 果断搜索注册机,搜到的结 ...
随机推荐
- Luogu 2530 化工厂装箱员
Written with StackEdit. Description \(118\)号工厂是世界唯一秘密提炼锎的化工厂,由于提炼锎的难度非常高,技术不是十分完善,所以工厂生产的锎成品可能会有\(3\ ...
- TCP传输控制协议
TCP 在TCP/IP协议模型中, 传输层协议有TCP和UDP, 这里主要介绍下可靠传输TCP协议, 目前是传输层协议首选. 特点 面向数据流(字节流形式) 虚电路连接 有缓冲传输(提供push机制 ...
- UIImage+PYJColorBecomeImage
UIImage+PYJColorBecomeImage.h: // // UIImage+PYJColorBecomeImage.h // 颜色转成图片 // // Created by PengYu ...
- css控制div下图片自适应解决方法:图片不超过最大宽度
我们(特别是像我一样的菜鸟)经常会遇到一个问题——图片自适应.这个问题是很普遍的.在文章区,在论坛,可以这么说:哪儿需要上传图片,哪儿就存在这个问题,而论坛上也不时有人询问.为什么?原因很简单,我们不 ...
- 关于android开发环境中sdk和adt更新到22.6之后多了appcompat_v7
昨天我打开Eclipse更新了一下sdk和adt到22.6,更新一切都很顺利,很开心的样子,可以新建一个工程时发现多了一个appcompat_v7这个东西,一下子就把小编怔住了,后来才发现这是官方的一 ...
- php写入、追加写入文件的实例
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); $t ...
- layui与layer同时引入冲突的问题
之前在项目中只有用layer,但是后来有用到了layui,结果发现同时引入这两个东东 会出现冲突的问题 导致代码运行不正常 后来网上找到了解决办法: 学习源头:http://fly.layui.com ...
- CCPC2018-湖南全国邀请赛 G String Transformation
G.String Transformation 题目描述 Bobo has a string S = s1 s2...sn consists of letter a , b and c . He ca ...
- 6.solr学习速成之multicore查询
查询关联多个core 再新建一个core 向每个core添加索引,修改 final static String SOLR_URL = "http://localhost:8080/solr/ ...
- JSP页面生成验证码功能
<%@ page language="java" contentType="text/html; charset=UTF-8" import=" ...