我尝试遵循此指南:https://xgboost.readthedocs.io/en/latest/build.html但是我收到了这些错误消息。有任何见解吗?
(基本)MacBook Pro-2:〜Prajnajiang $ pip3 install xgboost收集xgboost使用缓存的xgboost-1.0.2.tar.gz(821 kB)错误:命令错误,退出状态为1:命令:/ Users / apple / opt / anaconda3 / bin / python -c'导入sys,setuptools,令牌化; sys.argv [0] ='“'”'/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/setup.py'“”“; 文件 ='“'”'/ private / var / folders / 5y / 6cyzpgbx7895mzf3wfvryvrr0000gn / T / pip-install-quq3h_3t / xgboost / setup.py'“'”'; f = getattr(tokenize,'“' “'open'”'“',打开)(文件); code = f.read()。replace('”'“'\ r \ n'”'“','”'“'\ n'“'”'); f.close(); exec(compile(code,file,'“'”'exec'“'”'))'egg_info --egg-base / private / var / folders / 5y / 6cyzpgbx7895mzf3wfvryvrr0000gn / T / pip-install-quq3h_3t / xgboost / pip-egg-infocwd:/ private / var / folders / 5y / 6cyzpgbx7895mzf3wfvryvrr0000gn / T / pip-install-quq3h_3t / xgboost /完整的输出(27行):++ pwd+ oldpath = / private / var / folders / 5y / 6cyzpgbx7895mzf3wfvryvrr0000gn / T / pip-install-quq3h_3t / xgboost+ cd ./xgboost/+ mkdir -p构建+ CD构建+ cmake .../xgboost/build-python.sh:第21行:cmake:找不到命令+回声----------------------------------------------------------+ echo'建立多线程xgboost失败'构建多线程xgboost失败+ echo'开始构建单线程xgboost'开始构建单线程xgboost+ cmake .. -DUSE_OPENMP = 0./xgboost/build-python.sh:第27行:cmake:找不到命令追溯(最近一次通话):文件“”,第1行,位于在第42行中输入“ /private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/setup.py”文件LIB_PATH = libpath'find_lib_path'在find_lib_path的第50行中,文件“ /private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/xgboost/libpath.py”'候选人名单:\ n'+('\ n'.join(dll_path)))XGBoostLibraryNotFound:在候选路径中找不到XGBoost库,是否在根路径中安装了编译器并运行build.sh?候选人名单:/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/xgboost/libxgboost.dylib/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/xgboost/../../lib/libxgboost.dylib/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/xgboost/./lib/libxgboost.dylib/用户/苹果/opt/anaconda3/xgboost/libxgboost.dylib----------------------------------------错误:命令错误,退出状态为1:python setup.py egg_info检查日志以获取完整的命令输出。
问题已解决:问题是我没有安装cmake。安装cmake之后,问题已解决。