美文网首页
mac环境下安装xgboost和lightGBM

mac环境下安装xgboost和lightGBM

作者: Allen的光影天地 | 来源:发表于2019-02-04 18:35 被阅读3次
    1. 按照对应的github地址,分别下载两个安装包
    2. brew 安装 cmake, gcc, llvm(用于多线程)
    3. 配置 .zshrc 环境,具体如下:


      环境变量
    4. 开始编译对应安装包
    pip install --no-binary :all: lightgbm
    pip install lightgbm
    
    1. 报错
      <module 'lightgbm' from '/Users/allenhsu/anaconda3/lib/python3.7/sit packages/lightgbm/init.py'>
      /Users/allenhsu/anaconda3/lib/python3.7/site-packages/lightgbm/init.py:46: UserWarning: Starting from version 2.2.1, the library file in distribution wheels for macOS is built by the Apple Clang (Xcode_8.3.1) compiler.
      This means that in case of installing LightGBM from PyPI via the pip install lightgbm command, you don't need to install the gcc compiler anymore.
      Instead of that, you need to install the OpenMP library, which is required for running LightGBM on the system with the Apple Clang compiler.
      You can install the OpenMP library by the following command: brew install libomp.
      "You can install the OpenMP library by the following command: brew install libomp.", UserWarning)
    2. 参考文献:
    1. 注意: 现在我是成功安装了lightgbm 至于xgboost,等我用到的时候在安装吧。

    相关文章

      网友评论

          本文标题:mac环境下安装xgboost和lightGBM

          本文链接:https://www.haomeiwen.com/subject/nxopsqtx.html