当前位置:   article > 正文

M1 MacBook安装LGB,报错:‘/usr/lib/libomp.dylib‘ (no such file)的解决办法

libomp.dylib

pip install lightgbm

jupyter lab的notebook中执行

会报错OSError: dlopen(/Users/lihuilong/opt/anaconda3/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so, 0x0006): Library not loaded: '/usr/local/opt/libomp/lib/libomp.dylib'   Referenced from: '/Users/lihuilong/opt/anaconda3/lib/python3.9/site-packages/light

  1. import lightgbm as lgb
  2. lgb_classifier = lgb.LGBMClassifier()

看了很多教程都不太能用,还修改了PATh路径下载。

最后用虚拟conda环境中重新安装才可以使用。

conda install lightgbm

import lightgbm as gbm

摘自:【老码农随心记】Mac安装LGB,报错:'/usr/lib/libomp.dylib' (no such file)的解决办法 - 腾讯云开发者社区-腾讯云
 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/351544?site
推荐阅读
相关标签
  

闽ICP备14008679号