我尝试了所有可以在网上找到的安装xgboost == 0.6a2的解决方案
我有MacOS Mojave 10.14.4
我正在使用Python 3.6的virtualenv中进行尝试
这是pip命令的结果
pip install xgboost==0.6a2
Collecting xgboost==0.6a2
Using cached https://files.pythonhosted.org/packages/34/85/456a1a8c762f646671043e446a59efbce02b5f408f522c4ef8793e860c5e/xgboost-0.6a2.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/8s/jbryfvkn68jg4d2p2mncgqqw0000gq/T/pip-install-bp2gsdf9/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/private/var/folders/8s/jbryfvkn68jg4d2p2mncgqqw0000gq/T/pip-install-bp2gsdf9/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/8s/jbryfvkn68jg4d2p2mncgqqw0000gq/T/pip-install-bp2gsdf9/xgboost/xgboost/libxgboost.so
/private/var/folders/8s/jbryfvkn68jg4d2p2mncgqqw0000gq/T/pip-install-bp2gsdf9/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/8s/jbryfvkn68jg4d2p2mncgqqw0000gq/T/pip-install-bp2gsdf9/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8s/jbryfvkn68jg4d2p2mncgqqw0000gq/T/pip-install-bp2gsdf9/xgboost/
我下载了xgboost并尝试从源代码安装
python setup.py install
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/Users/karim/Documents/software/xgboost-0.6a2/xgboost/libxgboost.so
/Users/karim/Documents/software/xgboost-0.6a2/xgboost/../../lib/libxgboost.so
/Users/karim/Documents/software/xgboost-0.6a2/xgboost/./lib/libxgboost.so
我还尝试通过
安装gcc5简单安装gcc @ 5
哪个给
错误:已经安装了gcc @ 5 5.5.0_2
当我输入gcc -v
时会提示
配置有:--prefix = / Library / Developer / CommandLineTools / usr --with-gxx-include-dir = / Library / Developer / CommandLineTools / SDKs / MacOSX10.14.sdk / usr / include / c ++ / 4.2.1 Apple LLVM版本10.0.1(clang-1001.0.46.4)目标: x86_64-apple-darwin18.5.0线程模型:posix InstalledDir: / Library / Developer / CommandLineTools / usr / bin
在Mac上是否需要遵循任何特定步骤进行配置?
任何帮助,我们将不胜感激。
答案 0 :(得分:1)
我认为有
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8s/jbryfvkn68jg4d2p2mncgqqw0000gq/T/pip-install-bp2gsdf9/xgboost/
表示您的安装工具已过时。您可以通过执行以下操作来解决它:
pip install --upgrade setuptools