Ann*_*Ann 15 python anaconda xgboost
我在移动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?
Run Code Online (Sandbox Code Playgroud)
任何人都可以向我解释如何解决它?提前致谢.
Gus*_*avo 16
在尝试安装xgboost Python软件包而不存在xgboost二进制文件时,您会收到该消息.从源代码安装xgboost Python包的正确方法如下(假设您安装了gcc等编译器):
git clone --recursive https://github.com/dmlc/xgboost.git
cd xgboost
./build.sh
cd python-package
python setup.py install
Run Code Online (Sandbox Code Playgroud)
我更喜欢在虚拟环境中进行.请注意,克隆存储库时选项--recursive是必不可少的,因为它还将从不同的存储库(如dmlc-core)克隆文件夹,这些存储库是构建xgboost所必需的.
第一个答案的建议对我不起作用,并给我留下了与原始问题相同的错误。
如果我正确假设您的完整错误消息是这样的:
C:\Users\Matt\xgboost\python-package>python setup.py install
Traceback (most recent call last):
File "setup.py", line 19, in <module>
LIB_PATH = [os.path.relpath(libfile, CURRENT_DIR) for libfile in libpath['find_lib_path']()]
File "xgboost/libpath.py", line 49, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you install compilers and run build.sh in root path?
List of candidates:
C:\Users\Matt\xgboost\python-package\xgboost\xgboost.dll
C:\Users\Matt\xgboost\python-package\xgboost\../../lib/xgboost.dll
C:\Users\Matt\xgboost\python-package\xgboost\./lib/xgboost.dll
C:\Users\Matt\AppData\Local\Programs\Python\Python35\xgboost\xgboost.dll
C:\Users\Matt\xgboost\python-package\xgboost\../../windows/x64/Release/xgboost.dll
C:\Users\Matt\xgboost\python-package\xgboost\./windows/x64/Release/xgboost.dll
Run Code Online (Sandbox Code Playgroud)
那么解决方案是
1) 获取/查找/下载 setup.py 正在寻找的库。在 xgboost 文件夹中搜索.dll文件。看看你能不能找到类似xgboost.dll它可能被称为 的东西libxgboost.dll。如果可以,请转到第 2 步。如果找不到,请在此处下载
2) 将 .dll 文件复制到 xgboost/python-package/xgboost 文件夹中。如果该 .dll 未称为 xgboost.dll(即,如果它称为 libxgboost.dll),则将名称更改为 xgboost.dll
3) 运行 Gustavo 回答中概述的命令。请注意,这些旨在从 Git Bash 运行。
| 归档时间: |
|
| 查看次数: |
14696 次 |
| 最近记录: |