【求助】pip上安装xgboost提示Command errored out with exit status 1

zihaodeMacBook-Air:~ zihaofu$ pip3.8 install xgboost
Collecting xgboost
Using cached xgboost-1.0.1.tar.gz (820 kB)
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/setup.py’"’"’; file=’"’"’/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base /private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/pip-egg-info
cwd: /private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/
Complete output (27 lines):
++ pwd
+ oldpath=/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost
+ cd ./xgboost/
+ mkdir -p build
+ cd build
+ cmake …
./xgboost/build-python.sh: line 21: cmake: command not found
+ echo -----------------------------
-----------------------------
+ echo ‘Building multi-thread xgboost failed’
Building multi-thread xgboost failed
+ echo ‘Start to build single-thread xgboost’
Start to build single-thread xgboost
+ cmake … -DUSE_OPENMP=0
./xgboost/build-python.sh: line 27: cmake: command not found
Traceback (most recent call last):
File “”, line 1, in
File “/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/setup.py”, line 42, in
LIB_PATH = libpath’find_lib_path’
File “/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/xgboost/libpath.py”, line 47, in find_lib_path
raise XGBoostLibraryNotFound(
XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path?
List of candidates:
/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/xgboost/libxgboost.dylib
/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/xgboost/…/…/lib/libxgboost.dylib
/private/var/folders/8d/vccfl1bd4036kqv08hxf9v540000gn/T/pip-install-q6l78f3s/xgboost/xgboost/./lib/libxgboost.dylib
/Library/Frameworks/Python.framework/Versions/3.8/xgboost/libxgboost.dylib
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

你可能感兴趣的:(python,数据挖掘,机器学习,深度学习)