http://blog.csdn.net/kamendula/article/details/53166247
https://stackoverflow.com/questions/36211018/clang-error-errorunsupported-option-fopenmp-on-mac-osx-el-capitan-buildin
http://xgboost.readthedocs.io/en/latest/build.html
http://blog.csdn.net/qcxyliyong/article/details/52550431
https://www.cnblogs.com/haobang008/p/5907854.html
首先安装 gcc g++ gfortan
git clone --recursive http://github.com/dmlc/xgboost
cd xgboost; cp make/minimum.mk ./config.mk; make -j4
cd python-package; sudo python setup.py install
报xgboostMakefile:43: dmlc-core/make/dmlc.mk: No such file or directory
--recursive 参数很重要
git clone --recursive http://github.com/dmlc/xgboost
有 执行cd xgboost; cp make/config.mk ./config.mk; make -j4
报 clang: error: unsupported option '-fopenmp'
则 正确 执行:
cd xgboost; cp make/minimum.mk ./config.mk; make -j4
有时候需要制定 gcc g++ 的环境变量
export CC=/usr/local/bin/gcc
$ export CC=/usr/local/bin/gcc-6
$ export CC=/usr/local/bin/g++-6
- xgboost pip 安装报错,Xgboost 要使用gcc5 编译, python2.7 依赖的是gcc4.7
使用 git clone 到源码安装 ,提前安装好 gcc gcc5 brezel gfortran
参考 http://blog.csdn.net/u014365862/article/details/73739857
3.xgboost 安装好,在 Terminal 中 python 的REPL中可以使用,但是在 zeppelin 和 pycharm 中找不到xgboost 模块,引入模块失败
这个主要是 mac 中本身是python2.7 ,然后你又 安装 pyhton 3.6, 不知道还有一个 python3,总之 比较乱,所以关键是 你要在 zeppelin 和 pycharm中 指定好 其中安装了xgboost 模块的那个python ,我通过发现 安装 xgboost的其实是
python3.6,不是python3 也不是python2.7,所以我在zeppelin 和pycharm 中修改了python interpreter 的路径,改成python3.6 ,发现完美 引入,在 zeppelin和 pycharm中 就可以正常使用了