LoginSignup
0
0

More than 5 years have passed since last update.

macports環境でLightGBMのインストール

Last updated at Posted at 2018-04-26

macportsベースでインストールしたのでメモ。

いろいろインストール

$sudo port install gcc6 openmpi-gcc6

LightBGMのビルド

$git clone --recursive https://github.com/Microsoft/LightGBM; cd LightGBM
$mkdir build
$cd build
$cmake -DCMAKE_CXX_COMPILER=g++-mp6 -DCMAKE_C_COMPILER=gcc-mp-6 ..
$make -j4

この状態でpipからlightgbmをインストールすると、うまく関連付けできなくて動かないので、自分で入れる。情報はLightGBMのgithubのissueにあった。

今回はMacPortsでインストールしたg++-mp-6/gcc-mp-6を使っているので、それベースでsetup.pyからインストールする。

# at setup.py
cmake_cmd.append("-DCMAKE_CXX_COMPILER=clang++-mp-5.0")
cmake_cmd.append("-DCMAKE_C_COMPILER=clang-mp-5.0")

あとはsudo python setup.py installを実行する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0