Step 1:安装Xcode
从Apple Developer 安装或在终端运行:
xcode-select --install
Step 2:安装Homebrew
进入Homebrew官网复制链接在终端运行。但由于国内的防火墙很有可能会安装失败,这时我们可以选择切换镜像来安装。Mac镜像安装brew
Step 3:利用Homebrew安装cmake和libomp
brew install cmake libomp
Step 4:Conda安装XGBoost和LightGBM
确保你的环境中安装了numpy和sklearn
conda install lightgbm
conda install xgboost