简体   繁体   中英

XGBoost installation failing

I'm trying to install XGBoost on my AWS Ubuntu machine.

I followed the instructions and installed GCC and cmake. However, when I write

pip install xgboost

I get the following error

    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/

Any ideas what could be causing this?

According to python documentation:

This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from linux/include/errno.h, which should be pretty all-inclusive.

So Error code 1 is defined in errno.h and means Operation not permitted.

Your setuptools do not appear to be installed. So, try to upgrade python tools

pip install --upgrade setuptools

If it's already up to date, check that the module ez_setup is not missing. If it is, then

pip install ez_setup

Then try again

pip install unroll

If it's still not working, maybe pip didn't install/upgrade setup_tools properly so you might want to try

easy_install -U setuptools

and again

pip install unroll

for me was resolved after upgrading pip let us know about you..

There are instruction in the site: http://xgboost.readthedocs.io/en/latest/build.html

First:

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
make -j4

Then:

cd python-package
sudo python setup.py install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM