gpt4 book ai didi

python - XGBoostLibraryNotFound : Cannot find XGBoost Library in the candidate path, 您是否安装了编译器并在根路径中运行了 build.sh?

转载 作者:太空狗 更新时间:2023-10-29 17:03:07 26 4
gpt4 key购买 nike

我在移动 XGBoost 的 python-package 目录时遇到了这个问题。

Traceback (most recent call last): File "setup.py", line 19, in LIB_PATH = libpath'find_lib_path' File "xgboost/libpath.py", line 46, in find_lib_path 'List of candidates:\n' + ('\n'.join(dll_path))) builtin.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path?

谁能告诉我如何解决它?提前致谢。

最佳答案

在没有 xgboost 二进制文件的情况下尝试安装 xgboost Python 包时,您会收到该消息。从源代码安装 xgboost Python 包的正确方法如下(假设您安装了编译器,例如 gcc):

git clone --recursive https://github.com/dmlc/xgboost.git
cd xgboost
./build.sh
cd python-package
python setup.py install

我更喜欢在虚拟环境中进行。请注意,克隆存储库时的选项--recursive 是必不可少的,因为它还会从不同的存储库克隆文件夹,例如 dmlc-core,这是构建 xgboost 所必需的。

关于python - XGBoostLibraryNotFound : Cannot find XGBoost Library in the candidate path, 您是否安装了编译器并在根路径中运行了 build.sh?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43327020/

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