python3μ μ¬μ©νμ¬ OSX 10.11.6μ xgboostμ python λνΌλ₯Ό μ€μΉνλ €κ³ ν©λλ€. λ¨Όμ λ€μμ μννμ΅λλ€.
user@MacBook-Pro-de-User-2:~$ brew install gcc --without-multilib
==> Using the sandbox
==> Downloading https://ftpmirror.gnu.org/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2
Already downloaded: /Users/user/Library/Caches/Homebrew/gcc-6.2.0.tar.bz2
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/e9e0
Already downloaded: /Users/user/Library/Caches/Homebrew/gcc--patch-863957f90a934ee8f89707980473769cff47ca0663c3906992da6afb242fb220.patch
==> Patching
==> Applying 6.1.0-jit.patch
patching file gcc/jit/Make-lang.in
==> ../configure --build=x86_64-apple-darwin15.6.0 --prefix=/usr/local/Cellar/g
==> make bootstrap
==> make install
πΊ /usr/local/Cellar/gcc/6.2.0: 1,357 files, 242.5M, built in 69 minutes 18 seconds
κ·Έλ° λ€μ pip3μΌλ‘ xgboost μ€μΉλ₯Ό μ§ννλ©΄ λ€μμ΄ νμλ©λλ€.
user@MacBook-Pro-de-User-2:~$ pip3 install xgboost
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
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hg/zkgs3l417b7_0l4vth4bf8l00000gn/T/pip-build-hsmd0nxh/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/private/var/folders/hg/zkgs3l417b7_0l4vth4bf8l00000gn/T/pip-build-hsmd0nxh/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:
/private/var/folders/hg/zkgs3l417b7_0l4vth4bf8l00000gn/T/pip-build-hsmd0nxh/xgboost/xgboost/libxgboost.so
/private/var/folders/hg/zkgs3l417b7_0l4vth4bf8l00000gn/T/pip-build-hsmd0nxh/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/hg/zkgs3l417b7_0l4vth4bf8l00000gn/T/pip-build-hsmd0nxh/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hg/zkgs3l417b7_0l4vth4bf8l00000gn/T/pip-build-hsmd0nxh/xgboost/
κ·Έλ° λ€μ μ€λͺ μμ λμ μλ λλ‘ λΉλνλ €κ³ νμ΅λλ€.
Last login: Tue Aug 23 20:53:31 on ttys000
user@MacBook-Pro-de-User-2:~$ git clone --recursive https://github.com/dmlc/xgboost
Cloning into 'xgboost'...
remote: Counting objects: 17651, done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 17651 (delta 9), reused 0 (delta 0), pack-reused 17611
Receiving objects: 100% (17651/17651), 5.80 MiB | 1.08 MiB/s, done.
Resolving deltas: 100% (10851/10851), done.
Checking connectivity... done.
Submodule 'dmlc-core' (https://github.com/dmlc/dmlc-core) registered for path 'dmlc-core'
Submodule 'rabit' (https://github.com/dmlc/rabit) registered for path 'rabit'
Cloning into 'dmlc-core'...
remote: Counting objects: 3710, done.
remote: Total 3710 (delta 0), reused 0 (delta 0), pack-reused 3710
Receiving objects: 100% (3710/3710), 822.86 KiB | 864.00 KiB/s, done.
Resolving deltas: 100% (2197/2197), done.
Checking connectivity... done.
Submodule path 'dmlc-core': checked out 'd8d4dccb8bd89af9f57aa19e7523f0b755563ca4'
Cloning into 'rabit'...
remote: Counting objects: 3096, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 3096 (delta 0), reused 0 (delta 0), pack-reused 3090
Receiving objects: 100% (3096/3096), 886.44 KiB | 904.00 KiB/s, done.
Resolving deltas: 100% (2007/2007), done.
Checking connectivity... done.
Submodule path 'rabit': checked out '2dd7476ad7e4afe97eb579d39aab226ff74400a6'
κ·Έλ° λ€μ λ€μκ³Ό κ°μ΄ λΉλνλ €κ³ νμ΅λλ€.
user@MacBook-Pro-de-User-2:/$ cd xgboost; cp make/config.mk ./config.mk; make -j4
-bash: cd: xgboost: No such file or directory
cp: make/config.mk: No such file or directory
make: *** No targets specified and no makefile found. Stop.
xgboostλ₯Ό μ¬λ°λ₯΄κ² μ€μΉνλ λ°©λ²μ λν μμ΄λμ΄κ° μμ΅λκΉ?... ν λ¬ μ μ pip3μΌλ‘ xgboostλ₯Ό μ€μΉνλλ° μμ λ¬Έμ μ μ§λ©΄νμ§ μμμ΅λλ€.
λΆλͺ ν μ΄κ²μ OSXμμ μλνμ΅λλ€.
user@MacBook-Pro-de-User-2:~$ cd xgboost/
user@MacBook-Pro-de-User-2:~/xgboost$ clear
user@MacBook-Pro-de-User-2:~/xgboost$ ls
CMakeLists.txt R-package/ doc/ rabit/
CONTRIBUTORS.md README.md include/ src/
ISSUE_TEMPLATE.md amalgamation/ jvm-packages/ tests/
LICENSE build.sh* make/
Makefile demo/ plugin/
NEWS.md dmlc-core/ python-package/
user@MacBook-Pro-de-User-2:~/xgboost$ ./build.sh
g++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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++-6 -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
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/sparse_page_dmatrix.o src/data/sparse_page_dmatrix.cc >build/data/sparse_page_dmatrix.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/sparse_page_dmatrix.cc -o build/data/sparse_page_dmatrix.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/sparse_page_raw_format.o src/data/sparse_page_raw_format.cc >build/data/sparse_page_raw_format.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/sparse_page_raw_format.cc -o build/data/sparse_page_raw_format.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/sparse_page_source.o src/data/sparse_page_source.cc >build/data/sparse_page_source.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/sparse_page_source.cc -o build/data/sparse_page_source.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/data/sparse_page_writer.o src/data/sparse_page_writer.cc >build/data/sparse_page_writer.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/data/sparse_page_writer.cc -o build/data/sparse_page_writer.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/gbm/gblinear.o src/gbm/gblinear.cc >build/gbm/gblinear.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/gbm/gblinear.cc -o build/gbm/gblinear.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/gbm/gbm.o src/gbm/gbm.cc >build/gbm/gbm.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/gbm/gbm.cc -o build/gbm/gbm.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/gbm/gbtree.o src/gbm/gbtree.cc >build/gbm/gbtree.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/gbm/gbtree.cc -o build/gbm/gbtree.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/metric/elementwise_metric.o src/metric/elementwise_metric.cc >build/metric/elementwise_metric.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/metric/elementwise_metric.cc -o build/metric/elementwise_metric.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/metric/metric.o src/metric/metric.cc >build/metric/metric.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/metric/metric.cc -o build/metric/metric.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/metric/multiclass_metric.o src/metric/multiclass_metric.cc >build/metric/multiclass_metric.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/metric/multiclass_metric.cc -o build/metric/multiclass_metric.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/metric/rank_metric.o src/metric/rank_metric.cc >build/metric/rank_metric.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/metric/rank_metric.cc -o build/metric/rank_metric.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/objective/multiclass_obj.o src/objective/multiclass_obj.cc >build/objective/multiclass_obj.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/objective/multiclass_obj.cc -o build/objective/multiclass_obj.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/objective/objective.o src/objective/objective.cc >build/objective/objective.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/objective/objective.cc -o build/objective/objective.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/objective/rank_obj.o src/objective/rank_obj.cc >build/objective/rank_obj.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/objective/rank_obj.cc -o build/objective/rank_obj.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/objective/regression_obj.o src/objective/regression_obj.cc >build/objective/regression_obj.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/objective/regression_obj.cc -o build/objective/regression_obj.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/tree_model.o src/tree/tree_model.cc >build/tree/tree_model.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/tree_model.cc -o build/tree/tree_model.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/tree_updater.o src/tree/tree_updater.cc >build/tree/tree_updater.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/tree_updater.cc -o build/tree/tree_updater.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/updater_colmaker.o src/tree/updater_colmaker.cc >build/tree/updater_colmaker.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/updater_colmaker.cc -o build/tree/updater_colmaker.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/updater_histmaker.o src/tree/updater_histmaker.cc >build/tree/updater_histmaker.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/updater_histmaker.cc -o build/tree/updater_histmaker.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/updater_prune.o src/tree/updater_prune.cc >build/tree/updater_prune.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/updater_prune.cc -o build/tree/updater_prune.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/updater_refresh.o src/tree/updater_refresh.cc >build/tree/updater_refresh.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/updater_refresh.cc -o build/tree/updater_refresh.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/updater_skmaker.o src/tree/updater_skmaker.cc >build/tree/updater_skmaker.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/updater_skmaker.cc -o build/tree/updater_skmaker.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/tree/updater_sync.o src/tree/updater_sync.cc >build/tree/updater_sync.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/tree/updater_sync.cc -o build/tree/updater_sync.o
cd dmlc-core; /Library/Developer/CommandLineTools/usr/bin/make libdmlc.a config=/Users/user/xgboost/make/config.mk; cd /Users/user/xgboost
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o line_split.o src/io/line_split.cc
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o recordio_split.o src/io/recordio_split.cc
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o input_split_base.o src/io/input_split_base.cc
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o io.o src/io.cc
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o local_filesys.o src/io/local_filesys.cc
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o data.o src/data.cc
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o recordio.o src/recordio.cc
g++-6 -c -O3 -Wall -msse2 -Wno-unknown-pragmas -Iinclude -std=c++0x -fopenmp -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -o config.o src/config.cc
ar cr libdmlc.a line_split.o recordio_split.o input_split_base.o io.o local_filesys.o data.o recordio.o config.o
cd rabit; /Library/Developer/CommandLineTools/usr/bin/make lib/librabit.a; cd /Users/user/xgboost
g++-6 -c -O3 -msse2 -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -std=c++0x -fPIC -o allreduce_base.o src/allreduce_base.cc
g++-6 -c -O3 -msse2 -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -std=c++0x -fPIC -o allreduce_robust.o src/allreduce_robust.cc
g++-6 -c -O3 -msse2 -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -std=c++0x -fPIC -o engine.o src/engine.cc
g++-6 -c -O3 -msse2 -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -std=c++0x -fPIC -o c_api.o src/c_api.cc
ar cr lib/librabit.a allreduce_base.o allreduce_robust.o engine.o c_api.o
ar crv lib/libxgboost.a build/learner.o build/logging.o build/c_api/c_api.o build/c_api/c_api_error.o build/common/common.o build/data/data.o build/data/simple_csr_source.o build/data/simple_dmatrix.o build/data/sparse_page_dmatrix.o build/data/sparse_page_raw_format.o build/data/sparse_page_source.o build/data/sparse_page_writer.o build/gbm/gblinear.o build/gbm/gbm.o build/gbm/gbtree.o build/metric/elementwise_metric.o build/metric/metric.o build/metric/multiclass_metric.o build/metric/rank_metric.o build/objective/multiclass_obj.o build/objective/objective.o build/objective/rank_obj.o build/objective/regression_obj.o build/tree/tree_model.o build/tree/tree_updater.o build/tree/updater_colmaker.o build/tree/updater_histmaker.o build/tree/updater_prune.o build/tree/updater_refresh.o build/tree/updater_skmaker.o build/tree/updater_sync.o
a - build/learner.o
a - build/logging.o
a - build/c_api/c_api.o
a - build/c_api/c_api_error.o
a - build/common/common.o
a - build/data/data.o
a - build/data/simple_csr_source.o
a - build/data/simple_dmatrix.o
a - build/data/sparse_page_dmatrix.o
a - build/data/sparse_page_raw_format.o
a - build/data/sparse_page_source.o
a - build/data/sparse_page_writer.o
a - build/gbm/gblinear.o
a - build/gbm/gbm.o
a - build/gbm/gbtree.o
a - build/metric/elementwise_metric.o
a - build/metric/metric.o
a - build/metric/multiclass_metric.o
a - build/metric/rank_metric.o
a - build/objective/multiclass_obj.o
a - build/objective/objective.o
a - build/objective/rank_obj.o
a - build/objective/regression_obj.o
a - build/tree/tree_model.o
a - build/tree/tree_updater.o
a - build/tree/updater_colmaker.o
a - build/tree/updater_histmaker.o
a - build/tree/updater_prune.o
a - build/tree/updater_refresh.o
a - build/tree/updater_skmaker.o
a - build/tree/updater_sync.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -shared -o lib/libxgboost.so build/learner.o build/logging.o build/c_api/c_api.o build/c_api/c_api_error.o build/common/common.o build/data/data.o build/data/simple_csr_source.o build/data/simple_dmatrix.o build/data/sparse_page_dmatrix.o build/data/sparse_page_raw_format.o build/data/sparse_page_source.o build/data/sparse_page_writer.o build/gbm/gblinear.o build/gbm/gbm.o build/gbm/gbtree.o build/metric/elementwise_metric.o build/metric/metric.o build/metric/multiclass_metric.o build/metric/rank_metric.o build/objective/multiclass_obj.o build/objective/objective.o build/objective/rank_obj.o build/objective/regression_obj.o build/tree/tree_model.o build/tree/tree_updater.o build/tree/updater_colmaker.o build/tree/updater_histmaker.o build/tree/updater_prune.o build/tree/updater_refresh.o build/tree/updater_skmaker.o build/tree/updater_sync.o dmlc-core/libdmlc.a rabit/lib/librabit.a -pthread -lm -fopenmp
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/cli_main.o src/cli_main.cc >build/cli_main.d
g++-6 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -c src/cli_main.cc -o build/cli_main.o
g++-6 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -fopenmp -o xgboost build/cli_main.o build/learner.o build/logging.o build/c_api/c_api.o build/c_api/c_api_error.o build/common/common.o build/data/data.o build/data/simple_csr_source.o build/data/simple_dmatrix.o build/data/sparse_page_dmatrix.o build/data/sparse_page_raw_format.o build/data/sparse_page_source.o build/data/sparse_page_writer.o build/gbm/gblinear.o build/gbm/gbm.o build/gbm/gbtree.o build/metric/elementwise_metric.o build/metric/metric.o build/metric/multiclass_metric.o build/metric/rank_metric.o build/objective/multiclass_obj.o build/objective/objective.o build/objective/rank_obj.o build/objective/regression_obj.o build/tree/tree_model.o build/tree/tree_updater.o build/tree/updater_colmaker.o build/tree/updater_histmaker.o build/tree/updater_prune.o build/tree/updater_refresh.o build/tree/updater_skmaker.o build/tree/updater_sync.o dmlc-core/libdmlc.a rabit/lib/librabit.a -pthread -lm -fopenmp
Successfully build multi-thread xgboost
user@MacBook-Pro-de-User-2:~/xgboost$ cd python-package; python3 setup.py install
Install libxgboost from: ['/Users/user/xgboost/python-package/xgboost/../../lib/libxgboost.so']
running install
running bdist_egg
running egg_info
creating xgboost.egg-info
writing xgboost.egg-info/PKG-INFO
writing dependency_links to xgboost.egg-info/dependency_links.txt
writing top-level names to xgboost.egg-info/top_level.txt
writing requirements to xgboost.egg-info/requires.txt
writing manifest file 'xgboost.egg-info/SOURCES.txt'
reading manifest file 'xgboost.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'xgboost/include'
warning: no files found matching '*' under directory 'xgboost/src'
warning: no files found matching '*' under directory 'xgboost/make'
warning: no files found matching '*' under directory 'xgboost/rabit'
warning: no files found matching '*' under directory 'xgboost/lib'
warning: no files found matching '*' under directory 'xgboost/dmlc-core'
warning: no previously-included files matching '*.o' found anywhere in distribution
warning: no previously-included files matching '*.a' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'xgboost.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.11-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/xgboost
copying xgboost/__init__.py -> build/lib/xgboost
copying xgboost/callback.py -> build/lib/xgboost
copying xgboost/compat.py -> build/lib/xgboost
copying xgboost/core.py -> build/lib/xgboost
copying xgboost/libpath.py -> build/lib/xgboost
copying xgboost/plotting.py -> build/lib/xgboost
copying xgboost/rabit.py -> build/lib/xgboost
copying xgboost/sklearn.py -> build/lib/xgboost
copying xgboost/training.py -> build/lib/xgboost
copying xgboost/VERSION -> build/lib/xgboost
copying xgboost/build-python.sh -> build/lib/xgboost
creating build/bdist.macosx-10.11-x86_64
creating build/bdist.macosx-10.11-x86_64/egg
creating build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/__init__.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/build-python.sh -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/callback.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/compat.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/core.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/libpath.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/plotting.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/rabit.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/sklearn.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/training.py -> build/bdist.macosx-10.11-x86_64/egg/xgboost
copying build/lib/xgboost/VERSION -> build/bdist.macosx-10.11-x86_64/egg/xgboost
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/__init__.py to __init__.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/callback.py to callback.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/compat.py to compat.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/core.py to core.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/libpath.py to libpath.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/plotting.py to plotting.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/rabit.py to rabit.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/sklearn.py to sklearn.cpython-35.pyc
byte-compiling build/bdist.macosx-10.11-x86_64/egg/xgboost/training.py to training.cpython-35.pyc
installing package data to build/bdist.macosx-10.11-x86_64/egg
running install_data
copying /Users/user/xgboost/python-package/xgboost/../../lib/libxgboost.so -> build/bdist.macosx-10.11-x86_64/egg/xgboost
creating build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying xgboost.egg-info/PKG-INFO -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying xgboost.egg-info/SOURCES.txt -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying xgboost.egg-info/dependency_links.txt -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying xgboost.egg-info/not-zip-safe -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying xgboost.egg-info/requires.txt -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
copying xgboost.egg-info/top_level.txt -> build/bdist.macosx-10.11-x86_64/egg/EGG-INFO
creating dist
creating 'dist/xgboost-0.6-py3.5.egg' and adding 'build/bdist.macosx-10.11-x86_64/egg' to it
removing 'build/bdist.macosx-10.11-x86_64/egg' (and everything under it)
Processing xgboost-0.6-py3.5.egg
creating /usr/local/lib/python3.5/site-packages/xgboost-0.6-py3.5.egg
Extracting xgboost-0.6-py3.5.egg to /usr/local/lib/python3.5/site-packages
Adding xgboost 0.6 to easy-install.pth file
Installed /usr/local/lib/python3.5/site-packages/xgboost-0.6-py3.5.egg
Processing dependencies for xgboost==0.6
Searching for scipy==0.18.0
Best match: scipy 0.18.0
Adding scipy 0.18.0 to easy-install.pth file
Using /usr/local/lib/python3.5/site-packages
Searching for numpy==1.11.1
Best match: numpy 1.11.1
Adding numpy 1.11.1 to easy-install.pth file
Using /usr/local/lib/python3.5/site-packages
Finished processing dependencies for xgboost==0.6
κ·Έλ¬λ λ μ¬μ΄ μ€μΉ λ°©λ²μ΄ μλμ§ μκ³ μΆμ΅λλ€. μ μ μ¬νμ΄ μμ΅λκΉ?.
@alonsopg νμ¬ pip
μ€μΉμλ gcc-5
λλ clang-omp
νλ©° λ λ€ brew
λ₯Ό ν΅ν΄ μ€μΉν μ μμ΅λλ€. μ΅κ·Ό μ§μΉ¨ μ
λ°μ΄νΈ μ μ μνλμμ΅λλ€. μ£Όμ Mac OS X μ¬μ©μλ μ΄μ gcc-6
λ₯Ό μ¬μ©νλ―λ‘ λ€μ λ²μ μ gcc-6μΌλ‘ μ
λ°μ΄νΈνκ² μ΅λλ€. ννΈ, μ»΄νμΌν λλ‘ githubμμ μ€μΉνμμμ€.
+1λ μ νν μ΄ λ¬Έμ λ₯Ό λ°κ²¬νμ΅λλ€. μμλ΄κΈ°κ° λ§€μ° κΉλ€λ‘μ΅λλ€. λν clang-ompλ λ μ΄μ μμ‘° ν¨ν€μ§κ° μλλλ€.
$ brew install clang-omp
Error: No available formula with the name "clang-omp"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
@samuela clang-omp
μ΄(κ°) μ΄λ λμμΌλ―λ‘ brew install --with-clang llvm
μ(λ₯Ό) μλνμκ² μ΅λκΉ?
@phunterlau μ¬μ ν Mac 10.12.3μμ pip install xgboost
μ¬μ©ν μ μμ΅λλ€.
λλ μ»κ³ μλ€ :
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
λ λ Έλ ₯ νμ΄:
$ brew install clang-omp
Error: No available formula with the name "clang-omp"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
$ brew install --with-clang llvm
Warning: llvm: this formula has no --with-clang option so it will be ignored!
# snip
$ export PATH="/usr/local/opt/llvm/bin:$PATH"
$ export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
$ export CPPFLAGS="-I/usr/local/opt/llvm/include"
$ pip install xgboost
# snip
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
# snip
$ brew install gcc --without-multilib
$ pip install xgboost
# snip
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
# snip
Mac 10.12μ PyPi
μμ μ΄κ²μ μ€μΉνλ €λ©΄ μ΄λ»κ² ν΄μΌ ν©λκΉ? μμ€μμ μ€μΉνλ κ²μ μ루μ
μ΄ μλλλ€.
@JoeNyland μλ§λ λ€μμ΄ νμν κ²μ λλ€.
brew install cmake
https://github.com/dmlc/xgboost/issues/463 μμ μμ΄λμ΄λ₯Ό μ»μ μ μμ΅λλ€.
@d2Code κ°μ¬νμ§λ§ brew install cmake
μ΄νμλ λμΌν μ€λ₯ λ©μμ§κ° λνλ©λλ€.
$ pip install xgboost
...
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
...
@JoeNyland pipκ° μλ μμ€μμ xgboostλ₯Ό μ€μΉν μ μμ΅λλ€.
@d2Code μμ€μμ μ€μΉν μ μλ€λ κ²μ μκ³ μμ§λ§ pipμμ μ€μΉ ν΄μΌ ν©λλ€. pipμμ μ€μΉν μ μλ μ΄μ μ 맨 μλμ λλ¬νλ €κ³ ν©λλ€.
Mac 10.12μ
PyPi
μμ μ΄κ²μ μ€μΉνλ €λ©΄ μ΄λ»κ² ν΄μΌ ν©λκΉ? μμ€μμ μ€μΉνλ κ²μ μ루μ μ΄ μλλλ€.
@evanuk μ μ
$ env CC=gcc CXX=gcc pip install xgboost
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
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/91/nqdcr19d0xg6sjdb4m3vcc3c0000gn/T/pip-build-ozos8fjf/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/private/var/folders/91/nqdcr19d0xg6sjdb4m3vcc3c0000gn/T/pip-build-ozos8fjf/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:
/private/var/folders/91/nqdcr19d0xg6sjdb4m3vcc3c0000gn/T/pip-build-ozos8fjf/xgboost/xgboost/libxgboost.so
/private/var/folders/91/nqdcr19d0xg6sjdb4m3vcc3c0000gn/T/pip-build-ozos8fjf/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/91/nqdcr19d0xg6sjdb4m3vcc3c0000gn/T/pip-build-ozos8fjf/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/91/nqdcr19d0xg6sjdb4m3vcc3c0000gn/T/pip-build-ozos8fjf/xgboost/
$ brew info gcc | head -n 5
gcc: stable 6.3.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
/usr/local/Cellar/gcc/6.3.0_1 (1,358 files, 237.8MB) *
Built from source on 2017-04-06 at 11:53:19 with: --without-multilib
μ±κ³΅! π
λλ μ΄κ²μ μ¬κΈ° μμ λ°κ²¬
Xcodeμ Mac OS Xμ μλ clang LLVM μ»΄νμΌλ¬λ OpenMP λ€μ€ μ€λ λλ₯Ό μ§μνμ§ μμ΅λλ€. λ€λ₯Έ μ νμ νλΈλ₯ http://brew.sh/ λ₯Ό μ€μΉνκ³ λ€μ€ μ€λ λ OpenMP μ§μμ μ 곡νλ brew install g++-5λ₯Ό μ€μΉνλ κ²μ λλ€.
μ΄λ₯Ό μΌλμλκ³ μ΄κ²μ μλνμΌλ©° pipμμ μ€μΉν μ μμ΅λλ€!
$ brew install gcc<strong i="12">@5</strong>
$ pip install xgboost
μ μ΄κ²μ΄ μλνλμ§ λͺ¨λ₯΄κ² μ§λ§ brew install gcc --without-multilib
λ μλνμ§ μμμ΅λλ€.
λ€λ₯Έ μ¬μ©μλ€μ΄ μ΄ ν¨μ μ λΉ μ§κ³ μ€μ λ‘ λ¬΄μμ΄ μλͺ»λκ³ μλμ§ μμλ΄λλΌ μκ°μ λλΉν κ²μ΄λΌκ³ μκ°νμ§ μμ μ μμ΅λλ€. μ΄ ν΄κ²° λ°©λ²μ΄ ν¨κ³Όκ° μκΈ°λ₯Ό λ°λΌμ§λ§ pip ν¨ν€μ§μμ λ³΄λ€ μμ μ μΈ μ€μΉ 루ν΄μ λ³΄κ³ μΆμ΅λλ€ π€
@JoeNyland μ μ루μ λ μ μκ²
κ·νμ μ루μ μ κ°μ¬λ립λλ€! @JoeNyland
λλ κ·Έκ²μ μν΄ pipλ₯Ό μ¬μ©νμ§ μμλ€. λ¬Έμμ μ½κ°μ μ€λ₯κ° μμμ§λ§ μλ λ§ν¬λ₯Ό λ°λΌκ°λ©΄ λͺ κ°μ§ λ°©λ²μΌλ‘ ν΄κ²°ν μ μμ΅λλ€.
brew install gcc --without-multilib
μ ν¨κ» gcc7.1.0μ μ€μΉν λ€μ xgboostλ₯Ό 볡μ νκ³ ν΄λμ cd-edνκ³ make/config.mk
λ₯Ό λ€μκ³Ό κ°μ΄ μμ νμ΅λλ€.
# choice of compiler, by default use system preference.
export CC = gcc-7
export CXX = g++-7
# export MPICXX = mpicxx
κ·Έλ¦¬κ³ λ§μΉ¨λ΄ cp make/minimum.mk ./config.mk; make -j4
κ·Έλ° λ€μ python-package
cd-edνκ³ sudo python3 setup.py install
μ‘° μ μλΌ λλ¨ν΄!
@JoeNyland λ λκ°μ λ¬Έμ μ
@JoeNyland λΉμ μ λμ μμ μ λλ€! λλλ‘ μ°λ¦¬λ μκ³ ν νλκ° νμν©λλ€. κ·Έλ μ§ μμΌλ©΄ λ¬Έμ κ° ν΄κ²°λ μ μμ΅λλ€. κ°μ¬ν©λλ€!
κ·Έκ²μ μ΅μ μ ν΄κ²°μ± μ΄ μλλλ€. μ΄μ λ²μ μ GCCμ μμ‘΄νμ§ μμλ λλ€λ©΄ μ’μ κ²μ λλ€. κ·Έλ¬λ κ·Έκ²μ μ μ΄λ μ§κΈμ μλν©λλ€ π
κ·Έλ¬λ μ€ν ν μ¬μ ν λ€μ μ€λ₯ λ©μμ§κ° λνλ©λλ€.
$ μμ‘° μ€μΉ gcc@5
$ pip μ€μΉ xgboost
λ΄κ° μ μ΄κ±Έ λ°λμ§ μκ² μ΄? κ°μ¬ν©λλ€.
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 "<string>", line 1, in <module>
File "/private/var/folders/60/6w9_z9yd24n7nwv1cg23zz340000gn/T/pip-build-B7gSEL/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/private/var/folders/60/6w9_z9yd24n7nwv1cg23zz340000gn/T/pip-build-B7gSEL/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/60/6w9_z9yd24n7nwv1cg23zz340000gn/T/pip-build-B7gSEL/xgboost/xgboost/libxgboost.so
/private/var/folders/60/6w9_z9yd24n7nwv1cg23zz340000gn/T/pip-build-B7gSEL/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/60/6w9_z9yd24n7nwv1cg23zz340000gn/T/pip-build-B7gSEL/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------
"python setup.py egg_info" λͺ λ Ήμ΄ /private/var/folders/60/6w9_z9yd24n7nwv1cg23zz340000gn/T/pip-build-B7gSEL/xgboost/μ μ€λ₯ μ½λ 1κ³Ό ν¨κ» μ€ν¨νμ΅λλ€.
@cacoderquan μ΄ λ¬Έμ κ° μ¬μ ν νμλλ μ΄μ λ₯Ό μ λͺ¨λ₯΄κ² μ΅λλ€. pip install xgboost --no-cache-dir
λ₯Ό) μλνμ΅λκΉ?
μ¬μ ν μ€λ₯κ° νμλλ©΄ λ€μ κ²°κ³Όλ₯Ό κ²μν μ μμ΅λλ€.
python --version
pip --version
brew info gcc@5
GitHubλ μ λ§ comment-tldrsλ₯Ό μ»μ΄μΌ ν©λλ€. μ λ 10λΆ λμ μ΄κ²μ μ μ μ΄ λ€μ Έ 무μμ μ ν¬λ₯Ό μλνλ€κ° λ§μΉ¨λ΄ 100κ°κ° λλ μ’μμμ μΆμ² λ±μ λκΈμ λ³Ό μ μμμ΅λλ€. ).
νμ¬/μΌλ°μ μΌλ‘ gcc
μλ gcc@5
μμλ§ μλνλ νΉλ³ν μ΄μ κ° μμ΅λκΉ(νμ¬ gcc 7.2.0
κ° μμ΅λλ€)?
μλ
νμΈμ μ¬λ¬λΆ, μ λ ν¬λ§μ΄ μμ΅λλ€. μ€μ§ λΉμ λΏμ
λλ€.
okomarovμ λμμΌλ‘ xgboost μ€μΉμ μ±κ³΅νμ΅λλ€.
```msk-wire-darkstar-m:xgboost m.keremet$ cd νμ΄μ¬ ν¨ν€μ§
msk-wire-darkstar-m:python-package m.keremet$ sudo python3 setup.py μ€μΉ
λΉλ°λ²νΈ:
['../lib/libxgboost.dylib']μμ libxgboostλ₯Ό μ€μΉν©λλ€.
μ€μΉ μ€ν
μ€ν bdist_egg
μ€ν μ€μΈ egg_info
xgboost.egg-info μμ±
xgboost.egg-info/PKG-INFO μ°κΈ°
xgboost.egg-info/dependency_links.txtμ dependency_links μ°κΈ°
xgboost.egg-info/requires.txtμ μꡬμ¬ν μ°κΈ°
xgboost.egg-info/top_level.txtμ μ΅μμ μ΄λ¦ μ°κΈ°
맀λνμ€νΈ νμΌ 'xgboost.egg-info/SOURCES.txt' μμ± μ€
맀λνμ€νΈ νμΌ 'xgboost.egg-info/SOURCES.txt' μ½κΈ°
맀λνμ€νΈ ν
νλ¦Ώ 'MANIFEST.in' μ½κΈ°
κ²½κ³ : 'xgboost/include' λλ ν 리μμ ' 'μ μΌμΉνλ νμΌμ μ°Ύμ μ μμ΅λλ€.κ²½κ³ : 'xgboost/src' λλ ν 리μμ ' 'μ
κ²½κ³ : 'xgboost/make' λλ ν 리μμ ' 'μ μΌμΉνλ νμΌμ μ°Ύμ μ μμ΅λλ€.κ²½κ³ : 'xgboost/rabit' λλ ν 리μμ ' 'μ(
κ²½κ³ : 'xgboost/lib' λλ ν 리μμ ' 'μ( κ³Ό) μΌμΉνλ νμΌμ μ°Ύμ μ μμ΅λλ€.κ²½κ³ : 'xgboost/dmlc-core' λλ ν 리μμ ' 'μ
κ²½κ³ : λ°°ν¬νμμ ' μ°Ύμ μ μμ΅λλ€.κ²½κ³ : λ°°ν¬νμμ μΌμΉνλ μ΄μ μ ν¬ν¨λ νμΌμ μ°Ύμ μ μμ΅λλ€.
κ²½κ³ : λ°°ν¬νμμ ' μ°Ύμ μ μμ΅λλ€.κ²½κ³ : λ°°ν¬νμμ μΌμΉνλ μ΄μ μ ν¬ν¨λ νμΌμ μ°Ύμ μ μμ΅λλ€.
맀λνμ€νΈ νμΌ 'xgboost.egg-info/SOURCES.txt' μμ± μ€
build/bdist.macosx-10.7-x86_64/eggμ λΌμ΄λΈλ¬λ¦¬ μ½λ μ€μΉ
install_lib μ€ν
build_py μ€ν μ€
λΉλ μμ±
λΉλ/lib μμ±
λΉλ/lib/xgboost μμ±
xgboost/__init__.py λ³΅μ¬ -> build/lib/xgboost
xgboost/callback.py λ³΅μ¬ -> build/lib/xgboost
xgboost/compat.py λ³΅μ¬ -> build/lib/xgboost
xgboost/core.py λ³΅μ¬ -> build/lib/xgboost
xgboost/libpath.py λ³΅μ¬ -> build/lib/xgboost
xgboost/plotting.py λ³΅μ¬ -> build/lib/xgboost
xgboost/rabit.py λ³΅μ¬ -> build/lib/xgboost
xgboost/sklearn.py λ³΅μ¬ -> build/lib/xgboost
xgboost/training.py λ³΅μ¬ -> build/lib/xgboost
xgboost/VERSION λ³΅μ¬ -> build/lib/xgboost
xgboost/build-python.sh -> build/lib/xgboost 볡μ¬
λΉλ/bdist.macosx-10.7-x86_64 λ§λ€κΈ°
build/bdist.macosx-10.7-x86_64/egg μμ±
build/bdist.macosx-10.7-x86_64/egg/xgboost λ§λ€κΈ°
build/lib/xgboost/__init__.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/build-python.sh -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/callback.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/compat.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/core.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/libpath.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/plotting.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/rabit.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/sklearn.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/training.py -> build/bdist.macosx-10.7-x86_64/egg/xgboost 볡μ¬
build/lib/xgboost/VERSION λ³΅μ¬ -> build/bdist.macosx-10.7-x86_64/egg/xgboost
λ°μ΄νΈ μ»΄νμΌ λΉλ/bdist.macosx-10.7-x86_64/egg/xgboost/__init__.pyμμ __init__.cpython-36.pycλ‘
λ°μ΄νΈ μ»΄νμΌ λΉλ/bdist.macosx-10.7-x86_64/egg/xgboost/callback.py to callback.cpython-36.pyc
λ°μ΄νΈ μ»΄νμΌ build/bdist.macosx-10.7-x86_64/egg/xgboost/compat.py to compat.cpython-36.pyc
λ°μ΄νΈ μ»΄νμΌ λΉλ/bdist.macosx-10.7-x86_64/egg/xgboost/core.py to core.cpython-36.pyc
λ°μ΄νΈ μ»΄νμΌ build/bdist.macosx-10.7-x86_64/egg/xgboost/libpath.py to libpath.cpython-36.pyc
λ°μ΄νΈ μ»΄νμΌ build/bdist.macosx-10.7-x86_64/egg/xgboost/plotting.py to plotting.cpython-36.pyc
λ°μ΄νΈ μ»΄νμΌ build/bdist.macosx-10.7-x86_64/egg/xgboost/rabit.py to rabit.cpython-36.pyc
λ°μ΄νΈ μ»΄νμΌ build/bdist.macosx-10.7-x86_64/egg/xgboost/sklearn.py to sklearn.cpython-36.pyc
λ°μ΄νΈ μ»΄νμΌ build/bdist.macosx-10.7-x86_64/egg/xgboost/training.py to training.cpython-36.pyc
build/bdist.macosx-10.7-x86_64/eggμ ν¨ν€μ§ λ°μ΄ν° μ€μΉ
install_data μ€ν μ€
λ³΅μ¬ ../lib/libxgboost.dylib -> build/bdist.macosx-10.7-x86_64/egg/xgboost
λΉλ/bdist.macosx-10.7-x86_64/egg/EGG-INFO μμ±
xgboost.egg-info/PKG-INFO λ³΅μ¬ -> build/bdist.macosx-10.7-x86_64/egg/EGG-INFO
xgboost.egg-info/SOURCES.txt λ³΅μ¬ -> build/bdist.macosx-10.7-x86_64/egg/EGG-INFO
xgboost.egg-info/dependency_links.txt λ³΅μ¬ -> build/bdist.macosx-10.7-x86_64/egg/EGG-INFO
xgboost.egg-info/not-zip-safe λ³΅μ¬ -> build/bdist.macosx-10.7-x86_64/egg/EGG-INFO
xgboost.egg-info/requires.txt -> build/bdist.macosx-10.7-x86_64/egg/EGG-INFO 볡μ¬
xgboost.egg-info/top_level.txt -> build/bdist.macosx-10.7-x86_64/egg/EGG-INFO 볡μ¬
μμ± κ±°λ¦¬
'dist/xgboost-0.6-py3.6.egg' μμ± λ° 'build/bdist.macosx-10.7-x86_64/egg' μΆκ°
'build/bdist.macosx-10.7-x86_64/egg'(λ° κ·Έ μλμ λͺ¨λ κ²) μ κ±°
xgboost-0.6-py3.6.egg μ²λ¦¬
'/anaconda/lib/python3.6/site-packages/xgboost-0.6-py3.6.egg'(λ° κ·Έ μλμ λͺ¨λ κ²) μ κ±°
/anaconda/lib/python3.6/site-packages/xgboost-0.6-py3.6.egg λ§λ€κΈ°
xgboost-0.6-py3.6.eggλ₯Ό /anaconda/lib/python3.6/site-packagesλ‘ μΆμΆ
xgboost 0.6μ μ΄λ―Έ easy-install.pthμμ νμ± λ²μ μ
λλ€.
/anaconda/lib/python3.6/site-packages/xgboost-0.6-py3.6.egg μ€μΉ
xgboost==0.6μ λν μ²λ¦¬ μ’
μμ±
scipy==0.19.1 κ²μ μ€
λ² μ€νΈ 맀μΉ: scipy 0.19.1
easy-install.pth νμΌμ scipy 0.19.1 μΆκ°
/anaconda/lib/python3.6/site-packages μ¬μ©
numpy==1.13.1 κ²μ μ€
λ² μ€νΈ 맀μΉ: numpy 1.13.1
easy-install.pth νμΌμ numpy 1.13.1 μΆκ°
/anaconda/lib/python3.6/site-packages μ¬μ©
xgboost==0.6μ λν μ²λ¦¬ μ’
μμ± μλ£
msk-wire-darkstar-m:python-package m.keremet$ νμ΄μ¬
νμ΄μ¬ 3.6.1 |μλμ½λ€ 컀μ€ν
(x86_64)| (κΈ°λ³Έκ°, 2017λ
5μ 11μΌ, 13:04:09)
[GCC 4.2.1 νΈν κ°λ₯ν Apple LLVM 6.0(clang-600.0.57)] on darwin
μμΈν λ΄μ©μ λ³΄λ €λ©΄ "λμλ§", "μ μκΆ", "ν¬λ λ§" λλ "λΌμ΄μΌμ€"λ₯Ό μ
λ ₯νμμμ€.
xgboost κ°μ Έμ€κΈ°
Seems to work since no errors. However, when I try to import xgboost in jupyter it shoots this error:
```---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-1-1feb2e63ea38> in <module>()
3 import numpy as np
4 import pandas as pd
----> 5 import xgboost as xgb
/anaconda/lib/python3.6/site-packages/xgboost/__init__.py in <module>()
9 import os
10
---> 11 from .core import DMatrix, Booster
12 from .training import train, cv
13 from . import rabit # noqa
/anaconda/lib/python3.6/site-packages/xgboost/core.py in <module>()
110
111 # load the XGBoost library globally
--> 112 _LIB = _load_lib()
113
114
/anaconda/lib/python3.6/site-packages/xgboost/core.py in _load_lib()
104 if len(lib_path) == 0:
105 return None
--> 106 lib = ctypes.cdll.LoadLibrary(lib_path[0])
107 lib.XGBGetLastError.restype = ctypes.c_char_p
108 return lib
/anaconda/lib/python3.6/ctypes/__init__.py in LoadLibrary(self, name)
424
425 def LoadLibrary(self, name):
--> 426 return self._dlltype(name)
427
428 cdll = LibraryLoader(CDLL)
/anaconda/lib/python3.6/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
346
347 if handle is None:
--> 348 self._handle = _dlopen(self._name, mode)
349 else:
350 self._handle = handle
OSError: dlopen(/anaconda/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/5/libgomp.1.dylib
Referenced from: /anaconda/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so
Reason: image not found
μ΄ μ€λ₯μ λν΄ λ§μ΄ μ°Ύμ§ λͺ»νμ΅λλ€. λκ΅°κ°κ° κ·Έκ²μ λ°κ²¬ νμ΅λκΉ?
@cacoderquan λλ λΉμ κ³Ό λΉμ·ν λ¬Έμ λ₯Ό λ§λ¬κ³ μ€μ λ‘ gccκ° μ°κ²°λμ΄ μμ§ μμμ΅λλ€ .
λΉμ μ κ·Έκ²μ νμΈνκ³ μΆμ μλ μμ§λ§ λΉμ μ λ¬Έμ λ μ΄λ―Έ ν΄κ²°λμμ κ²μ
λλ€.
κ΄μ¬ μλ λ€λ₯Έ μ¬λλ€μ μν΄ μ°κ²°λμ§ μμ gccλ homebrew κΆν λ¬Έμ λ‘ μΈν΄ λ°μν μ μμ΅λλ€.
@JoeNyland μ ν루λ₯Ό ꡬν΄μ£Όμ μ κ°μ¬ν©λλ€.
@cacoderquan xgboost λ₯Ό pip μ€μΉνλ €κ³ ν λ λΉμ·ν λ¬Έμ κ° μμ΅λλ€.
λ΄ gcc λ²μ μ
gcc: stable 7.2.0 (bottled), HEAD
GNU compiler collection
https://gcc.gnu.org/
/usr/local/Cellar/gcc/7.2.0 (1,487 files, 285.2MB) *
Built from source on 2017-12-01 at 17:22:53
gccλ₯Ό μ¬λ¬ λ² μ€μΉνλ €κ³ μλνμ§λ§ μ무 κ²λ μλνμ§ μμ΅λλ€. pip install xgboostλ₯Ό μλν λλ§λ€ λ€μ μ€λ₯κ° λνλ©λλ€.
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
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
-----------------------------
Building multi-thread xgboost failed
Start to build single-thread xgboost
rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/learner.o] Error 127
make: *** Waiting for unfinished jobs....
clang-omp++ -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
/bin/sh: clang-omp++: command not found
make: *** [build/logging.o] Error 127
Successfully build single-thread xgboost
If you want multi-threaded version
See additional instructions in doc/build.md
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/19/1pcpc2r57_g6gjl_2v5_4kgc0000gn/T/pip-build-q8wmsvem/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/private/var/folders/19/1pcpc2r57_g6gjl_2v5_4kgc0000gn/T/pip-build-q8wmsvem/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:
/private/var/folders/19/1pcpc2r57_g6gjl_2v5_4kgc0000gn/T/pip-build-q8wmsvem/xgboost/xgboost/libxgboost.so
/private/var/folders/19/1pcpc2r57_g6gjl_2v5_4kgc0000gn/T/pip-build-q8wmsvem/xgboost/xgboost/../../lib/libxgboost.so
/private/var/folders/19/1pcpc2r57_g6gjl_2v5_4kgc0000gn/T/pip-build-q8wmsvem/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/19/1pcpc2r57_g6gjl_2v5_4kgc0000gn/T/pip-build-q8wmsvem/xgboost/
PLZ λμλ§
@schen57 pip install xgboost
μ€μΉ λ°©λ²μ GCC 5μμλ§ μλνλ€κ³ μ¬λ¬ κ³³μ λ¬Έμνλμ΄ μμ΅λλ€.
brew install gcc@5
ν μ€μΉλ₯Ό λ€μ μλνμμμ€.
https://github.com/dmlc/xgboost/blob/master/python-package/README.rst
https://xgboost.readthedocs.io/en/latest/build.html#building -on-macos
https://github.com/dmlc/xgboost/issues/1501#issuecomment -292209578
@alonsopg @phunterlau μ΄ λ¬Έμ λ₯Ό μ§κΈ μ’
λ£ν μ μλμ§ κΆκΈν©λλ€. OPκ°λ³΄κ³ ν μλ λ¬Έμ μ λν ν΄κ²°μ±
μ΄ μκΈ° λλ¬Έμ μλΉν 컀μ§κ³ ν΅μ ν μ μκ²λ©λλ€. μ΄μ λν μ₯κΈ°μ μΈ μμ μ pip install xgboost
λ©μλκ° μ΅μ GCC λ²μ μμ μλνλλ‘ νλ κ²μ΄μ§λ§, νΉλ³ν μ΄μ μ΄μ μ λ§μΆ λ³λμ λ¬Έμ μμ μ²λ¦¬νλ κ²μ΄ λ λ«λ€κ³ μκ°ν©λλ€. μ΄λ»κ² μκ°νλμ?
μ, λμνμ΅λλ€. pip μ€μΉλ xgboostμ μμ μ μΈ λ²μ μ μν΄ λ§λ€μ΄μ‘μΌλ―λ‘ μμ μ μΈ λ²μ μ gccκ° μ νλμμ΅λλ€. pip μ€μΉλ 곧 곡μ 릴리μ€λ₯Ό μ¬μ©νκ³ κ³νλλ‘ λ―Έλ¦¬ μ»΄νμΌλ λ°μ΄λ리λ₯Ό κ°μ Έμ΅λλ€.
gcc 5(brew ν¬ν¨)λ₯Ό μ€μΉνμ§λ§ xgboost λΉλλ μ¬μ ν LLVM λ²μ μ gcc(λ΄ κ²½μ°μλ 7)λ₯Ό μ¬μ©νμ΅λλ€. λΉλκ° gcc 5λ₯Ό μ¬μ©νλλ‘ νλ €λ©΄ λ€μμ μννμ΅λλ€.
brew install gcc<strong i="6">@5</strong>
env CC=gcc-5 CXX=g++-5 pip install xgboost
κ·Έλ¦¬κ³ μ΄κ²μ λλ₯Ό μν΄ μΌνμ΅λλ€.
λ€μμ μ΅μ λ²μ μ XGBoostλ₯Ό Anacondaμ μ½κ² μ μ©νλ λ° λμμ΄ λμμ΅λλ€.
brew
(μμ§ μλ κ²½μ°)brew install gcc<strong i="12">@5</strong>
env CC=gcc-5 CXX=g++-5 pip install xgboost
λͺ μκ° λμ κ³ κ΅°λΆν¬ ν ν μ루μ μ΄ ν¨κ³Όκ° μμλ @davidread μκ² κ°μ¬λ립λλ€. μ μ μ λ¬Ό!!!
@davidread μ μ루μ
μΈμλ pip installμ΄ μλνμ§ μμΌλ©΄ λ λ²μ§Έ μ€μ λ€μκ³Ό κ°μ΄ μλνμμμ€.
env CC=gcc-5 CXX=g++-5 pip3 install xgboost
μ΄κ²μ μλν΄μΌν©λλ€!
@davidread κ°μ¬ν©λλ€. gcc-7 λ° --without-multilib μ΅μ (gccμμλ λΉνμ±νλμ΄ μμ)μΌλ‘ λͺ μκ° λμ κ³ κ΅°λΆν¬ν ν λ§μΉ¨λ΄ μ루μ μ μ°Ύμ λκΉμ§ gcc-5μ pipλ‘ λ λ§μ μ΄λ €μμ κ²ͺμμ΅λλ€! λ€μ νλ² κ°μ¬ν©λλ€.
@cacoderquan μ λ κ°μ λ¬Έμ κ° μμμ΅λλ€. μ΄κ²μ μμ§ μ λ ¬νλμ§λ λͺ¨λ₯΄κ² μ§λ§(λͺ¨λ μ£Όμμ μ½μ§λ μμμ§λ§) λ¨Όμ ν°λ―Έλμμ build.sh νμΌμ μ€νν λ€μ python-packageμμ setup.pyλ₯Ό μ€ννμ¬ μ€μΉν μ μμμ΅λλ€. ν΄λ.
μμ λͺ¨λ λμ, νΉν @davidread μκ² κ°μ¬λ립λλ€. κ·νμ λ°©λ²μ μ
@okomarov xgboost μ€μΉ μ루μ μ΄ μ μκ² ν¨κ³Όμ μ΄μμ΅λλ€. 무리 κ°μ¬!
@davidread κ³ λ§μμ, λΉμ μ λ°©λ²μ΄ μ μκ²
κ°μ₯ μ μ©ν λκΈ
μ±κ³΅! π
λλ μ΄κ²μ μ¬κΈ° μμ λ°κ²¬
μ΄λ₯Ό μΌλμλκ³ μ΄κ²μ μλνμΌλ©° pipμμ μ€μΉν μ μμ΅λλ€!
μ μ΄κ²μ΄ μλνλμ§ λͺ¨λ₯΄κ² μ§λ§
brew install gcc --without-multilib
λ μλνμ§ μμμ΅λλ€.λ€λ₯Έ μ¬μ©μλ€μ΄ μ΄ ν¨μ μ λΉ μ§κ³ μ€μ λ‘ λ¬΄μμ΄ μλͺ»λκ³ μλμ§ μμλ΄λλΌ μκ°μ λλΉν κ²μ΄λΌκ³ μκ°νμ§ μμ μ μμ΅λλ€. μ΄ ν΄κ²° λ°©λ²μ΄ ν¨κ³Όκ° μκΈ°λ₯Ό λ°λΌμ§λ§ pip ν¨ν€μ§μμ λ³΄λ€ μμ μ μΈ μ€μΉ 루ν΄μ λ³΄κ³ μΆμ΅λλ€ π€