Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda install xgboost #1568

Closed
ghostintheshellarise opened this issue Sep 12, 2016 · 11 comments
Closed

Conda install xgboost #1568

ghostintheshellarise opened this issue Sep 12, 2016 · 11 comments

Comments

@ghostintheshellarise
Copy link

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

@phunterlau
Copy link
Contributor

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

@ghostintheshellarise
Copy link
Author

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

@felipecruz91
Copy link

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 :)

@phunterlau
Copy link
Contributor

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

@felipecruz91
Copy link

@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)

@phunterlau
Copy link
Contributor

Oh, you use windows, please install from GitHub

@felipecruz91
Copy link

@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 :)

@phunterlau
Copy link
Contributor

@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

@mingwandroid
Copy link

mingwandroid commented May 19, 2017

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.

@NikolayOG
Copy link

@mingwandroid you are hero

@xieliy
Copy link

xieliy commented May 29, 2018

@mingwandroid thump up

@tqchen tqchen closed this as completed Jul 4, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants