Xgboost: OSX 10.11.6에 μ„€μΉ˜ν•˜λŠ” λ™μ•ˆ λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆκΉŒ?

에 λ§Œλ“  2016λ…„ 08μ›” 24일  Β·  37μ½”λ©˜νŠΈ  Β·  좜처: dmlc/xgboost

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λ₯Ό μ„€μΉ˜ν–ˆλŠ”λ° μœ„μ˜ λ¬Έμ œμ— μ§λ©΄ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

성곡! πŸŽ‰

λ‚˜λŠ” 이것을 μ—¬κΈ° μ—μ„œ 발견

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 νŒ¨ν‚€μ§€μ—μ„œ 보닀 μ•ˆμ •μ μΈ μ„€μΉ˜ 루틴을 보고 μ‹ΆμŠ΅λ‹ˆλ‹€ 🀞

λͺ¨λ“  37 λŒ“κΈ€

λΆ„λͺ…νžˆ 이것은 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λ₯Ό μ‚¬μš©ν•˜μ§€ μ•Šμ•˜λ‹€. λ¬Έμ„œμ— μ•½κ°„μ˜ 였λ₯˜κ°€ μžˆμ—ˆμ§€λ§Œ μ•„λž˜ 링크λ₯Ό 따라가면 λͺ‡ 가지 λ°©λ²•μœΌλ‘œ ν•΄κ²°ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

http://stackoverflow.com/questions/39315156/how-to-install-xgboost-in-python-on-mac/43101972?noredirect=1#comment75102985_43101972

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 (아직 μ—†λŠ” 경우)
  • @davidread 의 μ§€μ‹œλ₯Ό λ”°λ₯΄μ‹­μ‹œμ˜€: ( @davidread μ—κ²Œ κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€ !!!)
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 κ³ λ§ˆμ›Œμš”, λ‹Ήμ‹ μ˜ 방법이 μ €μ—κ²Œ

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰