MAC os :LightGBM Installation Error in MacOS with Anaconda Python3

2021-03-04 12:21:03 浏览数 (1)

macos

  • 报错
代码语言:javascript复制
OSError: dlopen(/Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
  Referenced from: /Users/yanerrol/opt/anaconda3/envs/py366/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so
  Reason: image not found

解决办法

代码语言:javascript复制
$  pip uninstall lightgbm
$ git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
$ export CXX=g  -8 CC=gcc-8
$ mkdir build ; cd build
$ cmake ..
$ make -j4
$ pip install --no-binary :all: lightgbm

或者

代码语言:javascript复制
$ brew install lightgbm

0 人点赞