Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install on macOS #2972

Closed
samyip123 opened this issue Apr 4, 2020 · 1 comment
Closed

Install on macOS #2972

samyip123 opened this issue Apr 4, 2020 · 1 comment

Comments

@samyip123
Copy link

when installing on macos using
pip install lightgbm
the following occurred
OSError: dlopen(/Users/anaconda3/lib/python3.7/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: /Users/anaconda3/lib/python3.7/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found

when installing using
git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM
export CXX=g++-7 CC=gcc-7 # replace "7" with version of gcc installed on your machine
mkdir build ; cd build
cmake ..
make -j4
according to the installation guide, after running the setup.py file, there is a CMake error

CMake Error at /Users//anaconda3/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:49 (message):
Could not find compiler set in environment variable CC:
gcc-7.
Call Stack (most recent call first):
CMakeLists.txt:7 (PROJECT)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/Users//LightGBM/python-package/build_cpp/CMakeFiles/CMakeOutput.log".

@StrikerRUS
Copy link
Collaborator

when installing on macos using
pip install lightgbm

The reason is in not installed libomp

not loaded: /usr/local/opt/libomp/lib/libomp.dylib

Please follow the installation guide: https://github.com/microsoft/LightGBM/tree/master/python-package#install-from-pypi-using-pip.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants