报错内容:
Referenced from: /opt/homebrew/anaconda3/envs/biligame/lib/python3.7/site-packages/lightgbm/lib_lightgbm.so
Reason: tried: '/usr/local/opt/libomp/lib/libomp.dylib' (no such file), '/usr/local/lib/libomp.dylib' (no such file), '/usr/lib/libomp.dylib' (no such file)
网上很多说brew install libomp的,但是没能解决。
后来想到加上关键词m1,找到这篇博文M1芯片mac安装xgboost和lightgbm_SWUFE_SC的博客-CSDN博客_m1 安装xgboost
可以执行前两步
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
arch -x86_64 /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
再在x86架构下安装libomp
arch -x86_64 brew install libomp
之后再重新用pip安装lightgbm即可
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)