我正在尝试在我的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/你知道是什么原因造成的吗?
发布于 2018-01-30 06:31:51
根据python文档:
此模块提供标准的errno系统符号。每个符号的值是相应的整数值。这些名称和描述借用自linux/include/errno.h,它应该包含所有内容。
因此,错误代码1在errno.h中定义,表示不允许操作。
您的setuptools似乎未安装。因此,请尝试升级python工具
pip安装--升级setuptools
如果它已经是最新的,请检查模块ez_setup是否没有丢失。如果是,那么
pip安装ez_setup
然后重试
pip安装展开
如果它仍然不能工作,可能是pip没有正确安装/升级setup_tools,所以你可以试一试
easy_install -U安装工具
再一次
pip安装展开
升级后的pip让我们知道你的情况..
发布于 2018-02-04 22:09:24
网站上有相关说明: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 installhttps://stackoverflow.com/questions/48511008
复制相似问题