OSError: dlopen(/Users/user/anaconda3/lib/python3.7/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: /Users/user/anaconda3/lib/python3.7/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found
继续花半小时排坑 https://blog.csdn.net/weixin_32087115/article/details/81489627的方法,无效
后查阅官方文档——
For macOS users:
Starting from version 2.2.1, the library file in distribution wheels is built by the Apple Clang (Xcode_8.3.3) compiler. This means that you don't need to install the gcc compiler anymore. Instead of that you need to install the OpenMPlibrary, which is required for running LightGBM on the system with the Apple Clang compiler. You can install the OpenMP library by the following command: brew install libomp.
LightGBM编译依赖OpenMP,Apple Clang不支持
命令行 brew intall libomp
解决
来源:oschina
链接:https://my.oschina.net/u/4013710/blog/3164076