我试图在我的AWS Ubuntu计算机上安装XGBoost。
我按照说明安装了GCC和cmake。但是,当我写
时pip install xgboost
我收到以下错误
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-sorzhu8y/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/tmp/pip-build-sorzhu8y/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/tmp/pip-build-sorzhu8y/xgboost/xgboost/libxgboost.so
/tmp/pip-build-sorzhu8y/xgboost/xgboost/../../lib/libxgboost.so
/tmp/pip-build-sorzhu8y/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sorzhu8y/xgboost/
任何可能导致此问题的想法?
答案 0 :(得分:0)
根据python文档:
该模块提供标准的errno系统符号。价值 每个符号的对应整数值。名字和 描述是从linux / include / errno.h借来的,应该是 非常全包。
因此错误代码1在errno.h中定义,意味着不允许操作。
您的setuptools似乎未安装。 所以,尝试升级python工具
pip install --upgrade setuptools
如果它已经是最新的,请检查模块ez_setup是否缺失。如果是,那么
pip install ez_setup
然后再试一次
pip install unroll
如果它还没有工作,也许pip没有正确安装/升级setup_tools所以你可能想尝试
easy_install -U setuptools
再次
升级后,对我来说已经解决了 让我们了解你...pip install unroll
答案 1 :(得分:0)
网站上有说明:http://xgboost.readthedocs.io/en/latest/build.html
首先:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
make -j4
然后:
cd python-package
sudo python setup.py install