问题
自己使用pip install lightgbm’
安装了之后,没法直接调用,在使用过程中出现Reason: image not found
错误。然后查找问题,发现是mac系统的问题,没饭直接使用pip install。
解决方案
1、确保homebrew安装,并已经更新
2、安装cmake依赖
brew install cmake
brew install gcc
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM
mkdir build
cd build
3、编译
cmake -DCMAKE_CXX_COMPILER=g++-9 -DCMAKE_C_COMPILER=gcc-9 ..