Table of Contents
步骤
参考https://stackoverflow.com/questions/44937698/lightgbm-oserror-library-not-loaded
brew install cmake
brew install gcc --without-multilib
git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
cmake .. -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/6.2.0/bin/gcc-6 -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/6.2.0/bin/g++-6 -DOpenMP_C_FLAGS=-fopemmp
注意把gcc的两个路径改成你机器上的路径,DOpenMP_C_FLAGS标记是因为cmake脚本没有自动找到opemmp的路径,手动指定make -j
cd python-packages
sudo python setup.py install