Table of Contents
步骤
参考https://stackoverflow.com/questions/44937698/lightgbm-oserror-library-not-loaded
brew install cmakebrew install gcc --without-multilibgit clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBMmkdir build ; cd buildcmake .. -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 -jcd python-packagessudo python setup.py install