Mac下安装lightgbm-image not found

Error Message:

: dlopen(/Users/{xxx}/anaconda3/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgomp.1.dylib
Referenced from: /Users/{xxx}/anaconda3/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found

Steps to reproduce

1. pip uninstall lightgbm

2. conda install lightgbm

直接卸载,再通过conda install 安装就可以了。

 

---网上看了好多解决方案,都是围绕brew方法,如brew install libomp等,我的电脑因为网络问题无法安装brew,最后通过conda install成功解决了。

其他方法参考

官网:https://brew.sh/

brew安装方法:https://jingyan.baidu.com/article/86f4a73ed11fb837d6526992.html

brew使用方法:https://zhuanlan.zhihu.com/p/99104545

解决OSError方法 1:https://blog.csdn.net/weixin_39955829/article/details/111641436?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-3.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-3.no_search_link

解决OSError方法2:https://www.liangzl.com/get-article-detail-165250.html

 

posted @ 2021-11-15 17:39  冉溪  阅读(293)  评论(0编辑  收藏  举报