maxOs安装lightgbm:
brew install cmake
brew install libomp
git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
cmake
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp -IKaTeX parse error: Expected 'EOF', got '\ ' at position 33: …bomp)/include" \̲ ̲ -DOpenMP_C_LI…(brew --prefix libomp)/include"
-DOpenMP_CXX_LIB_NAMES=“omp”
-DOpenMP_omp_LIBRARY=$(brew --prefix libomp)/lib/libomp.dylib
…
遇到问题:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at
执行:xcode-select --install(保证xcode是最新版本)
出现对话框点击安装就好了,然后重新执行xcode-select --install就可以了
cmake …
make -j4
按照官网,此刻已经可以和lightgbm愉快的玩耍了,但是import lightgmb会提示找不到模块
cd …/python-package
sudo python setup.py install --precompile
pip install lightgbm
这样就可以了