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
Discussion and troubleshooting on PyPI (pip) installation (the newest 0.6 version) #1446
Comments
1、gcc-6.1.0_1 already installed |
|
@hemoely can you provide the full log somewhere, e.g. dropbox? P.S. you have |
Mac ,,thank you Collecting xgboost
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/n2/q3c3s28n7ybbmt2glbsb4s5h0000gn/T/pip-build-_5FFp6/xgboost/ |
@byronliwei seems like you don't have either |
@byronliwei brew install clang-omp |
I am hoping this is the right place for the following problem: (If not please let me know where to post this)
Any help really appreciated. Thank you! |
Makefile in Mac now requires gcc-5, maybe we should just ask gcc-6? |
Hi, I got the following error when I tried to install xgboost.
|
@liuxu1104 please install either |
@liuxu1104 seems like you have |
@phunterlau Thank you ! I build it on OS X (El Capitan 10.11.5, Anaconda Python 3.5) and it worked. Also installed gcc5 |
@phunterlau Solved! |
It's worth noting that |
@davechallis so, should we just remove |
@phunterlau it looks like the opemmp functionality is available in current versions of LLVM, so using that instead should work (but I can't test it on older versions of Mac OS X easily, so not sure if homebrew has the same channels/software available for them). I.e. Changing xgboost to then use these compilers (or gcc-6) on mac os x worked for me. |
I've already installed gcc-6, but still cannot install xgboost with the error below, Then I install clang-omp instead but still failed. The code is attached below
What should I do next? Please help. Thanks! |
@rayquazasnow seems like you have |
@phunterlau thanks for your advice. I successfully installed llvm by
|
@rayquazasnow please post the new error message from |
@phunterlau Here is the new error after I install llvm. Still with the message "/bin/sh: clang-omp++: command not found" $ pip install xgboost
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/m3/yqpf5xhs1rxbzyh_hz4lhx040000gn/T/pip-build-cEIF0a/xgboost/ After I update homebrew, the output of error code is shown below |
@rayquazasnow can you try
|
@phunterlau there is no response with $ which clang |
@rayquazasnow you might want to install or re-install |
I did |
I didn't quite get why clang-omp or gcc is needed in Mac. It says:
but finally gives:
So, as I see it the issue is something else. It should be installing xgboost with the single threaded version. I can install xgboost from git without gcc nor clang-omp++ ... using just the |
@AbdealiJK if there is no |
@phunterlau while I completely agree with that, I don't see why the installation failure happens. I don't understand why the error would be: builtin.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path? |
@phunterlau I was checking the pypi package to understand the problem and found that the way of calling make without openmp was invalid (and it always used -fopenmp). And that the default gcc/g++ was never an option. Modifying it with these diffs worked for me:
|
@AbdealiJK Thanks. |
Would love to, but I'm not sure what to modify - because the github build.sh and Makefile uses the correct versions. The pypi package seems to have a different structure and different files than github (maybe they just need to be updated?) |
@AbdealiJK oh, now I remember it: |
Would you consider uploading official prebuild wheel packages to pypi? It would make windows and mac users installation easier. Now windows users can get unofficial builds at http://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost |
@xgdgsc precompiled package is good. Is the Windows precompiled package made by you or someone that you know? can you add the recipe to the official guideline so other people can start using it? I have seen much pain on this issue list when installing windows version. As to precompiled PyPI build for Mac/Linux, we have to separate them since PyPI doesn't tell difference between platforms. Definitely a good idea, in short. |
That package is not made by me or anyone I know, but that page is famous among windows python users. I would suggest uploading precompiled packages to pypi just like what I do here. Pip would automatically select the right wheel package when user install. This way we just add the warning of installing the VC redistribution packages if loading the prebuilt binary failed. Another option is to use conda-forge to build the packages for anaconda users. |
I am trying to install xgboost and below is the result. [root@hostname bdinstalldir]# pip2.7 install xgboost Checked for gcc and we have following gcc's on node. [root@hostname bdinstalldir]# rpm -qa | grep -i gcc [root@hostname site-packages]# print xgboost.file Tried with --pre option and it didn't work as shown below. [root@hostname bdinstalldir]# pip2.7 install --pre xgboost g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api_error.cc -o build/c_api/c_api_error.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/logging.cc -o build/logging.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api.cc -o build/c_api/c_api.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/learner.cc -o build/learner.o In file included from src/c_api/./c_api_error.h:9,
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from include/xgboost/data.h:10,
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from dmlc-core/include/dmlc/logging.h:15,
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from dmlc-core/include/dmlc/logging.h:15,
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from src/c_api/c_api_error.cc:7: src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’: src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope make: *** [build/c_api/c_api_error.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from src/c_api/c_api.cc:3: include/xgboost/data.h: In constructor ‘xgboost::DMatrix::DMatrix()’: include/xgboost/data.h:234: error: ‘nullptr’ was not declared in this scope In file included from src/c_api/c_api.cc:15: src/c_api/../data/simple_csr_source.h: At global scope: src/c_api/../data/simple_csr_source.h:65: error: expected ‘;’ before ‘override’ src/c_api/../data/simple_csr_source.h:67: error: expected ‘;’ before ‘override’ src/c_api/../data/simple_csr_source.h:69: error: expected ‘;’ before ‘override’ In file included from src/c_api/c_api.cc:16: src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’: src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope In file included from include/xgboost/./gbm.h:17,
include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’: include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope In file included from src/c_api/c_api.cc:18: src/c_api/../common/io.h: At global scope: src/c_api/../common/io.h:30: error: expected ‘;’ before ‘override’ src/c_api/c_api.cc:267: error: expected ‘;’ before end of line src/c_api/c_api.cc:267: error: expected ‘}’ before end of line In file included from src/c_api/c_api.cc:18: src/c_api/../common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’: src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’ src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’ src/c_api/c_api.cc: At global scope: src/c_api/c_api.cc:267: error: expected unqualified-id before end of line src/c_api/c_api.cc:267: error: expected ‘}’ before end of line src/c_api/c_api.cc:267: error: expected ‘}’ before end of line src/c_api/c_api.cc:267: error: expected declaration before end of line In file included from src/learner.cc:17: src/./common/io.h: At global scope: src/./common/io.h:30: error: expected ‘;’ before ‘override’ src/learner.cc:484: error: expected ‘;’ before end of line src/learner.cc:484: error: expected ‘}’ before end of line In file included from src/learner.cc:17: src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’: src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’ src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’ src/learner.cc: At global scope: src/learner.cc:484: error: expected unqualified-id before end of line src/learner.cc:484: error: expected ‘}’ before end of line src/learner.cc:484: error: expected ‘}’ before end of line src/learner.cc:484: error: expected declaration before end of line make: *** [build/c_api/c_api.o] Error 1 make: *** [build/learner.o] Error 1 Building multi-thread xgboost failed Start to build single-thread xgboost rm -f -rf build build_plugin lib bin *~ /~ //*~ ///~ /.o //.o ///*.o xgboost g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d g++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api_error.cc -o build/c_api/c_api_error.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/learner.cc -o build/learner.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/c_api/c_api.cc -o build/c_api/c_api.o g++ -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/logging.cc -o build/logging.o In file included from src/c_api/./c_api_error.h:9,
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from include/xgboost/data.h:10,
dmlc-core/include/dmlc/base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from dmlc-core/include/dmlc/logging.h:15,
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from dmlc-core/include/dmlc/logging.h:15,
dmlc-core/include/dmlc/./base.h:71: note: #pragma message: Will need g++-4.6 or higher to compile allthe features in dmlc-core, compile without c++0x, some features may be disabled In file included from src/c_api/c_api_error.cc:7: src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’: src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope make: *** [build/c_api/c_api_error.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from include/xgboost/./gbm.h:17,
include/xgboost/././data.h: In constructor ‘xgboost::DMatrix::DMatrix()’: include/xgboost/././data.h:234: error: ‘nullptr’ was not declared in this scope In file included from src/c_api/c_api.cc:3: include/xgboost/data.h: In constructor ‘xgboost::DMatrix::DMatrix()’: include/xgboost/data.h:234: error: ‘nullptr’ was not declared in this scope In file included from src/learner.cc:17: src/./common/io.h: At global scope: src/./common/io.h:30: error: expected ‘;’ before ‘override’ src/learner.cc:484: error: expected ‘;’ before end of line src/learner.cc:484: error: expected ‘}’ before end of line In file included from src/learner.cc:17: src/./common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’: src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’ src/./common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’ src/learner.cc: At global scope: src/learner.cc:484: error: expected unqualified-id before end of line src/learner.cc:484: error: expected ‘}’ before end of line src/learner.cc:484: error: expected ‘}’ before end of line src/learner.cc:484: error: expected declaration before end of line In file included from src/c_api/c_api.cc:15: src/c_api/../data/simple_csr_source.h: At global scope: src/c_api/../data/simple_csr_source.h:65: error: expected ‘;’ before ‘override’ src/c_api/../data/simple_csr_source.h:67: error: expected ‘;’ before ‘override’ src/c_api/../data/simple_csr_source.h:69: error: expected ‘;’ before ‘override’ In file included from src/c_api/c_api.cc:16: src/c_api/../common/thread_local.h: In static member function ‘static T* xgboost::common::ThreadLocalStore::Get()’: src/c_api/../common/thread_local.h:44: error: ‘nullptr’ was not declared in this scope In file included from src/c_api/c_api.cc:18: src/c_api/../common/io.h: At global scope: src/c_api/../common/io.h:30: error: expected ‘;’ before ‘override’ src/c_api/c_api.cc:267: error: expected ‘;’ before end of line src/c_api/c_api.cc:267: error: expected ‘}’ before end of line In file included from src/c_api/c_api.cc:18: src/c_api/../common/io.h: In constructor ‘xgboost::common::PeekableInStream::PeekableInStream(dmlc::Stream*)’: src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘strm_’ src/c_api/../common/io.h:28: error: class ‘xgboost::common::PeekableInStream’ does not have any field named ‘buffer_ptr_’ src/c_api/c_api.cc: At global scope: src/c_api/c_api.cc:267: error: expected unqualified-id before end of line src/c_api/c_api.cc:267: error: expected ‘}’ before end of line src/c_api/c_api.cc:267: error: expected ‘}’ before end of line src/c_api/c_api.cc:267: error: expected declaration before end of line make: *** [build/learner.o] Error 1 make: *** [build/c_api/c_api.o] Error 1 Successfully build single-thread xgboost If you want multi-threaded version See additional instructions in doc/build.md Traceback (most recent call last): File "", line 17, in File "/tmp/pip_build_root/xgboost/setup.py", line 29, in
File "/tmp/pip_build_root/xgboost/xgboost/libpath.py", line 45, in find_lib_path
builtin.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_root/xgboost/xgboost/libxgboost.so /tmp/pip_build_root/xgboost/xgboost/../../lib/libxgboost.so /tmp/pip_build_root/xgboost/xgboost/./lib/libxgboost.so Cleaning up... Thanks |
Do we need to upgrade gcc, can we any older version which can run with gcc 4. Isn't gcc OS related compiler. Thanks |
@kishore432 you can try github install and manually edit the compiler requirement in |
I was pip-installing xgboost 0.6a2 in a CentOS container where Excerpts from the verbose pip output:
...
|
These error messages when pip-installing in a Python 3 environment are caused by print statements using Python 2 syntax. They don't seem to cause any harm though. In this case, I'm happy that the installation problem doesn't trigger an error at installation time.
I found the offending files here: https://github.com/dmlc/rabit/tree/master/guide |
|
I have MacOS El Captain, and I have installed gcc 49 and gcc 5, and yet I can not install xgboost using pip install xgboost. I receive bunch of messages with the following red error message at the bottom: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/9x/9vqgp6tn69d5mxkspzw840qr0000gn/T/pip-build-GuPlss/xgboost/ I have seen many complained over the same issue, but I did not find any satisfying response. Maybe I have missed it. Thanks |
I could not get pip install xgboost working, but I followed this instruction here: https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_on_Mac_OSX?lang=en where I used git-clone and now I have xgboost. |
After some good tries (#1445), the PyPI
xgboost
installation is updated to the most recent code https://pypi.python.org/pypi/xgboost/ and Mac/Linux users can install it viapip install xgboost
. I recommend usingAnaconda
orMiniconda
python release for easier dependency resolution onnumpy
scipy
andscikit-learn
, and updatepip
(setuptools
) to the most recent version.Before typing
pip install xgboost
and happy waiting, please follow the instruction on the PyPI page as copied here:gcc
frombrew
bybrew tap homebrew/versions; brew install gcc --without-multilib
firstly.gcc
bysudo apt-get install build-essential
firstly or using the corresponding package manager of the system.pip
installation may not work on some windows environment, and it may cause unexpected errors. pip installation on windows is currently disabled for further investigation, please install from Github.If everything is fine, after hearing CPU fan noise for couple of minutes (it is compiling on the fly), one should see something like this:
This package is tested with Mac OS X 10.10, ubuntu 14/16 and CentOS 7 with no problem. Please report any issues or installation difficulties here, with detailed information. For having the debug output, please use
pip install -v xgboost
. Thanks.The text was updated successfully, but these errors were encountered: