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

'pip install xgboost' error: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T/pip-build-9REzJF/xgboost/ #2887

Closed
chrislun16 opened this issue Nov 19, 2017 · 9 comments

Comments

@chrislun16
Copy link

## Environment info
Operating System: Mac OS X 10.11.6

Compiler: GCC 4.2.1

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

  1. command used : pip install xgboost

## Steps to reproduce

  1. pip install xgboost

## What have you tried?

  1. reinstalling gcc

Log:
Collecting xgboost
Using cached xgboost-0.6a2.tar.gz
Complete output from command python setup.py egg_info:
rm -f -rf build build_plugin lib bin *~ /~ //*~ ///~ /.o //.o ///*.o xgboost
g++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/common/common.o src/common/common.cc >build/common/common.d
g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/common/common.cc -o build/common/common.o
g++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/data.o src/data/data.cc >build/data/data.d
g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/data.cc -o build/data/data.o
g++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/simple_csr_source.o src/data/simple_csr_source.cc >build/data/simple_csr_source.d
g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/simple_csr_source.cc -o build/data/simple_csr_source.o
g++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/simple_dmatrix.o src/data/simple_dmatrix.cc >build/data/simple_dmatrix.d
g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/simple_dmatrix.cc -o build/data/simple_dmatrix.o
src/c_api/c_api.cc:739:12: warning: 'XGBOOST_LINK_RABIT_C_API_' defined but not used [-Wunused-variable]
static int XGBOOST_LINK_RABIT_C_API_ = RabitLinkTag();
^
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccdSctiB.s:20502:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccdSctiB.s:22740:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccdSctiB.s:22933:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccdSctiB.s:23176:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccdSctiB.s:23265:suffix or operands invalid for movq' make: *** [build/c_api/c_api.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from dmlc-core/include/dmlc/data.h:16:0, from include/xgboost/data.h:11, from src/data/data.cc:5: dmlc-core/include/dmlc/./registry.h:275:14: warning: 'xgboost::data::__reg_file_tag_sparse_page_raw_format__' defined but not used [-Wunused-variable] static int __reg_file_tag_ ## UniqueTag ## __ = __dmlc_registry_file_tag_ ## UniqueTag ## __(); ^ src/data/data.cc:305:1: note: in expansion of macro 'DMLC_REGISTRY_LINK_TAG' DMLC_REGISTRY_LINK_TAG(sparse_page_raw_format); ^ In file included from dmlc-core/include/dmlc/registry.h:14:0, from include/xgboost/./gbm.h:11, from include/xgboost/learner.h:16, from src/learner.cc:8: dmlc-core/include/dmlc/./parameter.h:254:43: warning: 'xgboost::__make__LearnerModelParamParamManager__' defined but not used [-Wunused-variable] static ::dmlc::parameter::ParamManager &__make__ ## PType ## ParamManager__ = \ ^ src/learner.cc:112:1: note: in expansion of macro 'DMLC_REGISTER_PARAMETER' DMLC_REGISTER_PARAMETER(LearnerModelParam); ^ dmlc-core/include/dmlc/./parameter.h:254:43: warning: 'xgboost::__make__LearnerTrainParamParamManager__' defined but not used [-Wunused-variable] static ::dmlc::parameter::ParamManager &__make__ ## PType ## ParamManager__ = \ ^ src/learner.cc:113:1: note: in expansion of macro 'DMLC_REGISTER_PARAMETER' DMLC_REGISTER_PARAMETER(LearnerTrainParam); ^ /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:2816:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:2820:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:7710:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:8294:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:9951:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:9955:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:11229:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:11233:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:13117:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:13310:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:13553:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccGHJDbJ.s:13642:suffix or operands invalid for movq' make: *** [build/data/simple_dmatrix.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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -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++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/common/common.o src/common/common.cc >build/common/common.d g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/common/common.cc -o build/common/common.o g++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/data.o src/data/data.cc >build/data/data.d g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/data.cc -o build/data/data.o g++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/simple_csr_source.o src/data/simple_csr_source.cc >build/data/simple_csr_source.d g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/simple_csr_source.cc -o build/data/simple_csr_source.o g++-5 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/simple_dmatrix.o src/data/simple_dmatrix.cc >build/data/simple_dmatrix.d g++-5 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/simple_dmatrix.cc -o build/data/simple_dmatrix.o src/c_api/c_api.cc:739:12: warning: 'XGBOOST_LINK_RABIT_C_API_' defined but not used [-Wunused-variable] static int XGBOOST_LINK_RABIT_C_API_ = RabitLinkTag(); ^ /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccaiz5mH.s:20502:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccaiz5mH.s:22740:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccaiz5mH.s:22933:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccaiz5mH.s:23176:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccaiz5mH.s:23265:suffix or operands invalid for movq'
make: *** [build/c_api/c_api.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from dmlc-core/include/dmlc/data.h:16:0,
from include/xgboost/data.h:11,
from src/data/data.cc:5:
dmlc-core/include/dmlc/./registry.h:275:14: warning: 'xgboost::data::reg_file_tag_sparse_page_raw_format' defined but not used [-Wunused-variable]
static int reg_file_tag ## UniqueTag ## __ = dmlc_registry_file_tag ## UniqueTag ## ();
^
src/data/data.cc:305:1: note: in expansion of macro 'DMLC_REGISTRY_LINK_TAG'
DMLC_REGISTRY_LINK_TAG(sparse_page_raw_format);
^
In file included from dmlc-core/include/dmlc/registry.h:14:0,
from include/xgboost/./gbm.h:11,
from include/xgboost/learner.h:16,
from src/learner.cc:8:
dmlc-core/include/dmlc/./parameter.h:254:43: warning: 'xgboost::make__LearnerModelParamParamManager' defined but not used [-Wunused-variable]
static ::dmlc::parameter::ParamManager &make ## PType ## ParamManager
=
^
src/learner.cc:112:1: note: in expansion of macro 'DMLC_REGISTER_PARAMETER'
DMLC_REGISTER_PARAMETER(LearnerModelParam);
^
dmlc-core/include/dmlc/./parameter.h:254:43: warning: 'xgboost::make__LearnerTrainParamParamManager' defined but not used [-Wunused-variable]
static ::dmlc::parameter::ParamManager &make ## PType ## ParamManager
=
^
src/learner.cc:113:1: note: in expansion of macro 'DMLC_REGISTER_PARAMETER'
DMLC_REGISTER_PARAMETER(LearnerTrainParam);
^
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:2816:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:2820:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:7710:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:8294:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:9951:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:9955:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:11229:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:11233:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:13117:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:13310:suffix or operands invalid for movq'
/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:13553:suffix or operands invalid for movq' /var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T//ccBOFZkT.s:13642:suffix or operands invalid for movq'
make: *** [build/data/simple_dmatrix.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 1, in
File "/private/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T/pip-build-9REzJF/xgboost/setup.py", line 29, in
LIB_PATH = libpath'find_lib_path'
File "/private/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T/pip-build-9REzJF/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_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:
/private/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T/pip-build-9REzJF/xgboost/xgboost/libxgboost.so
/private/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T/pip-build-9REzJF/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T/pip-build-9REzJF/xgboost/xgboost/./lib/libxgboost.so

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sq/rsh6q1hd4mz_bnq2cf_6hs1w0000gn/T/pip-build-9REzJF/xgboost/

@phunterlau
Copy link
Contributor

Can you try at least gcc-5?

@chrislun16
Copy link
Author

I'm a bit confused about my gcc version.

When I type "gcc -v", it says Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

But then when I try to install gcc-5, it says "gcc@5 5.5.0 is already installed"

@phunterlau
Copy link
Contributor

Please check your CC_PATH configuration and make sure gcc-5 is the default

@chrislun16
Copy link
Author

@phunterlau I tried doing that and am still getting the error. Any other suggestions?

@phunterlau
Copy link
Contributor

Can you try installing gcc-7 and using Github installation instead?

@chrislun16
Copy link
Author

chrislun16 commented Nov 22, 2017

@phunterlau I tried that and got this error:

Makefile:31: MAKE [/Applications/Xcode.app/Contents/Developer/usr/bin/make] - checked OK
c++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
c++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
c++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -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
c++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude -Idmlc-core/include -Irabit/include -I/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
clangclangclang: : : errorerrorerror: : : unsupported option '-fopenmp'unsupported option '-fopenmp'unsupported option '-fopenmp'

make: *** [build/c_api/c_api_error.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/logging.o] Error 1
make: *** [build/c_api/c_api.o] Error 1
clang: error: unsupported option '-fopenmp'
make: *** [build/learner.o] Error 1

@lt911
Copy link

lt911 commented Jan 30, 2018

same error, any ideas of fixing it?

@chrislun16
Copy link
Author

chrislun16 commented Jan 30, 2018 via email

@lt911
Copy link

lt911 commented Jan 30, 2018

Hi, just get the import working, not sure if it function right. You can check out this:
https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_on_Mac_OSX?lang=en

it is basically uncomment the gcc line in the make file and use the compiler that you wish.

Cheers!

@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

4 participants