我的目标是学习一本笔记本。它的召回率高达 97%,而我却在 F1 分数“流失客户”77.9% 的挣扎中苦苦挣扎。问题是笔记本使用LightGBM。我无法安装 LightGBM。
我尝试过的:
pip install lightgbm
-> 它会抛出错误 python setup.py egg_info did not run successfully.
pip install wheel
-> 现在它抛出错误 python setup.py bdist_wheel did not run successfully.
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
截至撰写本文时,尚无正式版本的
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#5269 和 microsoft/LightGBM#5328 中跟踪正式支持 LightGBM M1 Mac 版本的进展。