一开始用的是Windows系统,pip装完lightgbm直接就可以跑了,没想到MacOS装完lightgbm后,import没问题,但是一旦调用train就挂,先是怀疑jupyter有问题,把jupyter换成VCScode,依旧报错:
Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click here for more info. View Jupyter log for further details.
这时开始怀疑是macOS系统的问题,少了什么依赖。搜了之后看到很多lightgbm在MacOS上安装的踩坑经历,发现我一开始的安装可能有问题,我是直接pip install lightgbm的,没想到MacOS的安装这么麻烦...
lightgbm按照官网的安装指南是需要安装其他东西的:
具体见官方