对于错误或安装问题,请提供以下信息。
您提供的信息越多,我们就越容易提供
帮助和建议。
操作系统:
Mac OS X El 队长 10.11.6
使用的包(python/R/jvm/C++):
Python
使用的xgboost
版本:
0.3.0
如果从源安装,请提供
git rev-parse HEAD
)如果您使用的是 python 包,请提供
xgboost
的命令我已经成功安装了 xgboost,它显示在根目录下。 但是,当我尝试导入 xgboost 时,它说该包不存在。
OSError:dlopen(//anaconda/lib/python2.7/site-packages/libxgboostwrapper.so,6):未加载库:@rpath/./libgomp.1.dylib
引用自://anaconda/lib/python2.7/site-packages/libxgboostwrapper.so
原因:找不到图片
@ghostintheshellarise版本xgboost=0.3
似乎非常过时。 既然你有conda
,你想试试pip install xgboost
吗?
我按照这个指示
但它在最后一个命令中不起作用
python setup.py install --user
并返回以下错误信息
Traceback (most recent call last):
File "setup.py", line 19, in <module>
LIB_PATH = libpath['find_lib_path']()
File "xgboost/libpath.py", line 47, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
__builtin__.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candidate path, did you install compilers and run build.sh in root path?
List of candidates:
/Users/SimonTse/xgboost/python-package/xgboost/libxgboost.so
/Users/SimonTse/xgboost/python-package/xgboost/../../lib/libxgboost.so
/Users/SimonTse/xgboost/python-package/xgboost/./lib/libxgboost.so
//anaconda/xgboost/libxgboost.so
我确实尝试通过 pip 指令安装,但它给了我消息,我已经安装了 xgboost
Requirement already satisfied (use --upgrade to upgrade): xgboost in /anaconda/lib/python2.7/site-packages
我没有受过 CS 训练,所以对我来说一切看起来都很神秘
我遇到了同样的问题:
Cannot find XGBoost Libarary in the candidate path, did you install compilers and run build.sh in root path?
你找到任何解决方案了吗?
非常感谢 :)
@felipecruz91在拥有必要的编译器(例如 gcc 5)之后,您是否尝试过使用pip install xgboost
,而不是使用conda
安装?
@phunterlau是的,我尝试使用pip install xgboost
但我收到以下错误:
No files/directories in C:\Users\....\AppData\Local\Temp\pip-build-9j_99ys4\xgboost\pip-egg-info (from PKG-INFO)
哦,你用的是windows,请从GitHub安装
@phunterlau我尝试从 Github 安装:
git clone --recursive https://github.com/dmlc/xgboost
git submodule init
git submodule update
alias make='mingw32-make'
cp make/mingw64.mk config.mk; make -j4
cd python-package
python setup.py install
我收到以下错误:
Traceback (most recent call last):
File "setup.py", line 19, in <module>
LIB_PATH = libpath['find_lib_path']()
File "xgboost/libpath.py", line 46, 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\felipe.cruz\Source\Repos\xgboost2\xgboost\python-package\xgboost\libxgboost.dll
C:\Users\felipe.cruz\Source\Repos\xgboost2\xgboost\python-package\xgboost\../../lib/libxgboost.dll
C:\Users\felipe.cruz\Source\Repos\xgboost2\xgboost\python-package\xgboost\./lib/libxgboost.dll
C:\Users\felipe.cruz\AppData\Local\Continuum\Miniconda3\xgboost\libxgboost.dll
C:\Users\felipe.cruz\Source\Repos\xgboost2\xgboost\python-package\xgboost\../../windows/x64/Release/libxgboost.dll
C:\Users\felipe.cruz\Source\Repos\xgboost2\xgboost\python-package\xgboost\./windows/x64/Release/libxgboost.dll
任何想法?
非常感谢 :)
@felipecruz91请按照 IBM 的这个说明(安装说明中也提到过),一步一步,严格
https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en
要安装官方的Anaconda Distribution
xgboost Python 包,请使用conda install py-xgboost
(在 Windows、Linux 或 macOS 上),对于 R 包,它是conda install r-xgboost
。
@mingwandroid你是英雄
@mingwandroid 顶一下
最有用的评论
要安装官方的
Anaconda Distribution
xgboost Python 包,请使用conda install py-xgboost
(在 Windows、Linux 或 macOS 上),对于 R 包,它是conda install r-xgboost
。