Skip to content

Instantly share code, notes, and snippets.

@umbertogriffo
Last active February 24, 2023 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umbertogriffo/d660e261bd215935b6855b4a9a79e35b to your computer and use it in GitHub Desktop.
Save umbertogriffo/d660e261bd215935b6855b4a9a79e35b to your computer and use it in GitHub Desktop.
MacOS 12 M1 (Apple Silicon) - Build LightGBM from GitHub

MacOS 12 M1 (Apple Silicon) - Build LightGBM from GitHub

Install CMake (3.16 or higher):

brew install cmake
# On MacOS 11 M1 - Apple Silicon
ibrew install cmake

Install OpenMP:

brew install libomp
# On MacOS 11 M1 - Apple Silicon
ibrew install libomp

If it's already installed, uninstall lightgbm:

pip uninstall lightgbm
# or
pipenv uninstall lightgbm

Run the following commands:

git clone --recursive --branch v3.2.0 --single-branch --depth 1 https://github.com/Microsoft/LightGBM
cd LightGBM/python-package
python3 setup.py install
cd ../..
rm -rf LightGBM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment