机器学习

LightGBM安装问题

2018-06-28  本文已影响29人  只为此心无垠

第一步:安装brew(如果电脑已经有brew可略过)

在终端输入:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

第二步:用brew 安装cmake

brew install cmake
brew install gcc --without-multilib 

第三部:配置

git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM  
export CXX=g++-7 CC=gcc-7  
cmake ..  
make -j4

最后:用pip安装

pip install lightgbm

会出现一个问题:

在第三部会出现问题:Could not find compiler set in environment variable CC: gcc-7

git clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBM
export CXX=g++-8 CC=gcc-8
mkdir build ; cd build
cmake ..
make -j4
上一篇下一篇

猜你喜欢

热点阅读