While installing lightgbm on macbook, i.e., try to do this “python3 -m pip install lightgbm”,
I encounted the two following errors one at a time:
(1) subprocess.CalledProcessError: Command ‘[‘make’,’_lightgbm’ … ] some error related to cmake
(2) fatal error: ‘omp.h’ file not found
Solutions to install lightgbm on macOS are:
first solution, simply do
brew install lightgbm |
second solution, using pip install
- Install CMake (3.16 or higher):
brew install cmake
- Install OpenMP:
brew install libomp
- insall lightgbm using pip
python3 -m pip install lightgbm