标签:inux 参考 fss blob file ace 战略 目录 除了
官方教程:https://github.com/Microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#macos
(1)安装homebrew
参考:https://brew.sh/index_zh-cn
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
(2)使用homebrew直接安装
brew install lightgbm
(1)安装homebrew
参考:https://brew.sh/index_zh-cn
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
(2)安装cmake和gcc
brew install cmake
brew install gcc
(3)使用gcc构建:mac上gcc可能为8.1版本,我们需要将编译器改为gcc-7版本
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine
mkdir build ; cd build
cmake ..
make -j4
(1)安装homebrew
参考:https://brew.sh/index_zh-cn
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
(2)安装cmake和OpenMP
brew install cmake
(3)安装OpenMP
brew install libomp
(4)直接使用cmake构建makefile,然后make编译
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
mkdir build ; cd build
cmake ..
make -j4
参考:https://github.com/microsoft/LightGBM/tree/master/python-package
如果要在python中运行lightgbm,除了上面的三种方法之一外,还需要:
brew install libomp
python -m pip install lightgbm
标签:inux 参考 fss blob file ace 战略 目录 除了
原文地址:https://www.cnblogs.com/hugechuanqi/p/12604089.html