gpt4 book ai didi

python-3.x - 使用 "pip3 install xgboost"安装时出错

转载 作者:行者123 更新时间:2023-12-02 02:55:35 27 4
gpt4 key购买 nike

我尝试遵循本指南:https://xgboost.readthedocs.io/en/latest/build.html但我收到了这些错误消息。有什么见解吗?

(基本)MacBook-Pro-2:~般若江$ pip3 install xgboost收集xgboost 使用缓存的 xgboost-1.0.2.tar.gz (821 kB) 错误:命令出错,退出状态为 1: 命令:/Users/apple/opt/anaconda3/bin/python -c '导入 sys、setuptools、tokenize; 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, '"'"'打开'"'"', 打开)(文件);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, 文件, '"'"'exec'"'"'))' Egg_info --egg-base/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/pip-egg-info cwd:/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/ 完整输出(27行): ++密码 + oldpath=/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost + cd ./xgboost/ + mkdir -p 构建 + 光盘构建 + cmake .. ./xgboost/build-python.sh:第 21 行:cmake:找不到命令 + 回声----------------------------- ---------------------------- + echo '构建多线程xgboost失败' 构建多线程xgboost失败 + echo '开始构建单线程xgboost' 开始搭建单线程xgboost + cmake .. -DUSE_OPENMP=0 ./xgboost/build-python.sh:第 27 行:cmake:找不到命令 回溯(最近一次调用最后一次): 文件“”,第 1 行,位于 文件“/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/setup.py”,第 42 行,位于 LIB_PATH = libpath'find_lib_path' 文件“/private/var/folders/5y/6cyzpgbx7895mzf3wfvryvrr0000gn/T/pip-install-quq3h_3t/xgboost/xgboost/libpath.py”,第 50 行,位于 find_lib_path '候选列表:\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 /Users/apple/opt/anaconda3/xgboost/libxgboost.dylib ----------------------------------------------------错误:命令错误,退出状态为 1:python setup.py Egg_info 检查日志以获取完整的命令输出。

最佳答案

问题已解决:问题是我没有安装cmake。安装cmake后,问题解决。

关于python-3.x - 使用 "pip3 install xgboost"安装时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61200269/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com