LightGBM 可用于 Mac M1 吗?

问题描述 投票:0回答:1

我的目标是学习一本笔记本。它的召回率高达 97%,而我却在 F1 分数“流失客户”77.9% 的挣扎中苦苦挣扎。问题是笔记本使用LightGBM。我无法安装 LightGBM。

我尝试过的:

  1. pip install lightgbm
    -> 它会抛出错误
    python setup.py egg_info did not run successfully.
  2. 然后,我做了
    pip install wheel
    -> 现在它抛出错误
    python setup.py bdist_wheel did not run successfully.
  3. 然后,我做了
    pip install Cmake
    pip install --upgrade pip setuptools
    brew install libomp
    -> 错误仍然存在。

完整错误

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]
      INFO:root:running bdist_wheel
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      INFO:root:running build
      INFO:root:running build_py
      INFO:root:creating build
      INFO:root:creating build/lib
      INFO:root:creating build/lib/lightgbm
python pip apple-m1 kaggle lightgbm
1个回答
6
投票

截至撰写本文时,尚无正式版本的

lightgbm
(LightGBM 的 Python 包)支持 M1 Mac(使用 ARM 芯片)。

osx-arm64
lightgbm
的构建由
lightgbm
conda-forge feedstock
支持,因此您可以使用
lightgbm
在 M1 Mac 上安装
conda

conda install \
   --yes \
   -c conda-forge \
   'lightgbm>=3.3.3'

可以在 microsoft/LightGBM#5269microsoft/LightGBM#5328 中跟踪正式支持 LightGBM M1 Mac 版本的进展。

© www.soinside.com 2019 - 2024. All rights reserved.