While setting up LightGBM on my M1 Mac, I discovered that the default pip install lightgbm command does not work due to compatibility issues with Apple Silicon and libomp dependencies.
After trying various fixes, including setting environment variables and reinstalling libomp via Homebrew, I still encountered installation errors with:
pip install lightgbm --no-binary :all:
After some research, I found a solution that worked: creating a new Conda environment and installing LightGBM using Conda-Forge:
1
2
3
4
conda install \
--yes \
-c conda-forge \
'lightgbm>=3.3.3'
This approach successfully installed LightGBM without further issues.
For more details and troubleshooting options, I found this Stack Overflow discussion useful.