LightGBM was used in Kaggle's this article. The page below also mentions that LightGBM is often talked about in Kaggle.
This page describes the flow when you install lightGBM in your OSX virtualenv environment.
Please refer to the installation guide below.
I did the following under the environment I want to install.
$ brew install cmake
$ brew install gcc --without-multilib
$ git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
$ mkdir build ; cd build
$ cmake ..
$ make -j
At the time of cmake ..
, the following error may occur.
$ cmake ..
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:8 (PROJECT):
The CMAKE_C_COMPILER:
gcc-7
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:8 (PROJECT):
The CMAKE_CXX_COMPILER:
g++-7
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
In my case, this seems to be due to the low version of gcc, and I solved it by upgrading.
$ brew upgrade gcc
Next, refer to the following to enable import.
Install the dependent libraries first.
$ pip install setuptools numpy scipy scikit-learn -U
Go to / LightGBM / python-package /
and do the following and you're done.
$ python setup.py install
I was able to import successfully.
import lightgbm as lgb
Thank you very much.
Recommended Posts