Xgboost: Conda install xgboost

Created on 12 Sep 2016  ·  11Comments  ·  Source: dmlc/xgboost

For bugs or installation issues, please provide the following information.
The more information you provide, the more easily we will be able to offer
help and advice.

Environment info

Operating System:
Mac OS X El Captain 10.11.6

Package used (python/R/jvm/C++):
Python

xgboost version used:
0.3.0

If installing from source, please provide

  1. The commit hash (git rev-parse HEAD)
  2. Logs will be helpful (If logs are large, please upload as attachment).

If you are using python package, please provide

  1. The python version and distribution
    2.7
  2. The command to install xgboost if you are not installing from source
    conda install -c akode xgboost=0.3

Steps to reproduce

I have successfully installed xgboost and it is shown at the root. However, when i tried to import xgboost it said the package is not there.

OSError: dlopen(//anaconda/lib/python2.7/site-packages/libxgboostwrapper.so, 6): Library not loaded: @rpath/./libgomp.1.dylib
Referenced from: //anaconda/lib/python2.7/site-packages/libxgboostwrapper.so
Reason: image not found

Most helpful comment

To install the official Anaconda Distribution xgboost Python package please use conda install py-xgboost (on Windows, Linux or macOS), for the R package, it's conda install r-xgboost.

All 11 comments

@ghostintheshellarise the version xgboost=0.3 seems very outdated. since you have conda, do you want to try pip install xgboost ?

I following this instruction

  1. Open Terminal
  2. type : git clone https://github.com/dmlc/xgboost.git
  3. type : cd xgboost; make; cd wrapper; python setup.py install --user

But it doesn't work at the last command
python setup.py install --user

and return following error message

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

And I did try to install via pip instruction but it gave me the message that I am already installed with xgboost

Requirement already satisfied (use --upgrade to upgrade): xgboost in /anaconda/lib/python2.7/site-packages

I am no CS trained so everything looks so cryptic to me

I am experiencing the same issue:

Cannot find XGBoost Libarary in the candidate path, did you install compilers and run build.sh in root path?

Did you find any solution?

Thank you very much :)

@felipecruz91 have you tried with pip install xgboost after having necessary compilers (gcc 5 for example), instead of using conda install?

@phunterlau Yes I tried using pip install xgboost but I get the following error:

No files/directories in C:\Users\....\AppData\Local\Temp\pip-build-9j_99ys4\xgboost\pip-egg-info (from PKG-INFO)

Oh, you use windows, please install from GitHub

@phunterlau I tried installing from 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

And I get the following error:

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

Any idea?

Thank you very much :)

@felipecruz91 please follow this instruction by IBM (as mentioned in the installation instruction too) , step by step, strictly
https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en

To install the official Anaconda Distribution xgboost Python package please use conda install py-xgboost (on Windows, Linux or macOS), for the R package, it's conda install r-xgboost.

@mingwandroid you are hero

@mingwandroid thump up

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthewmav picture matthewmav  ·  3Comments

trivialfis picture trivialfis  ·  3Comments

vkuznet picture vkuznet  ·  3Comments

choushishi picture choushishi  ·  3Comments

lizsz picture lizsz  ·  3Comments