2017-06-19 131 views
0

我想在我的mac(10.12.5)上安裝xgboost,並且經過多次嘗試,我沒有成功。我遵循不同的tuto試圖通過添加gcc-6來修改gcc變量,但我有同樣的問題。Mac上的Xgboost安裝

所以我做了什麼:

  1. 混帳克隆--recursive https://github.com/dmlc/xgboost
  2. CD xgboost; cp make/minimum.mk ./config.mk;使-j4

我有以下錯誤:

/usr/local/bin/g++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/learner.o src/learner.cc >build/learner.d 
/usr/local/bin/g++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/logging.o src/logging.cc >build/logging.d 
/usr/local/bin/g++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d 
/usr/local/bin/g++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -DDISABLE_OPENMP -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d 
/bin/sh: /usr/local/bin/g++: No such file or directory 
/bin/sh: /usr/local/bin/g++: No such file or directory 
make: *** [build/learner.o] Error 127 
make: *** Waiting for unfinished jobs.... 
/bin/sh: /usr/local/bin/g++: No such file or directory 
make: *** [build/logging.o] Error 127 
make: *** [build/c_api/c_api.o] Error 127 
/bin/sh: /usr/local/bin/g++: No such file or directory 
make: *** [build/c_api/c_api_error.o] Error 127 

我的gcc版本是:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 
Apple LLVM version 8.1.0 (clang-802.0.42) 
Target: x86_64-apple-darwin16.6.0 
Thread model: posix 
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin 

我真的需要你的幫助。目前我使用pip install xgboost來使用庫,但我知道這不是使用這個庫的正確方法。 感謝您的幫助

PS:抱歉,如果我的英語也不行,我不流利

回答