LightGBM安装问题

第一步:安装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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容