-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
LightGBM and gcc 8 in MacOS: Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgomp.1.dylib
#1369
Comments
okay, I see. |
@guolinke by default this should be now gcc-8 for macOS. |
@Laurae2 thanks. |
Yeah, after this PR #1357 Travis artifact for macOS is built by Since there is an incompatibility between Or there is another variant. I'm not a mac user, so I don't know can |
Travis images we run aren't the latest version of macOS, but I think we just can document this behavior. |
I also found a small hack for OsX High Sierra which has by default gcc 8, and lightgbm required gcc 7. Here is a great doc for lightgbm if u want to use the highPerformance using MPI or GPU or HDFS then refer here: |
Most developers use Mac, and lgb can't be installed on mac? Why did you do that? |
EDIT The following post solves it for me (from Xgboost)
Seems to be an issue with my environment rather than the repo... thanks anyways On MAC OSX El Capitan I am unable to run make .. it seems it doesn't find or like my compiler. When I run
Now running the commands in terminal
Yields the following message:
|
I'm getting the following error after being able to successfully install lightgbm, even though
|
@fx86 I think it is a warning, not an error, and you are able to run lightgbm, right ? |
Yes, it loads. Any clue why that warning ? Also, another concern is - once imported into a Jupyter notebook, the module seems to have very basic attributes. Like the following lines show:
output: |
@fx86 Yeah, it's just a This warning will be removed in the future. |
when I get to the step $ make -j4 |
have the same problem on my mac, any updates? |
@unnir , would you give a shot on the new options in #1975 (comment)? |
If you don't mind doing a conda install, try: import sys This resolved the problem for me (run in a jupyter notebook cell) |
To solve the problem I installed the libomp using brew: |
I have everything working, and |
@sshleifer Please read this #1369 (comment). |
Env OSX, I think one should do
so I use |
This works for me. |
For Mac OS, this worked for me: macOS Apple Clang Install CMake (3.12 or higher): brew install cmake brew install libomp git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM For Mojave (10.14) For High Sierra or earlier (<= 10.13) make -j4 brew install cmake brew install gcc git clone --recursive https://github.com/microsoft/LightGBM ; cd LightGBM |
The solution is simple and it is provided in pypi lightgbm
Note: If you don't have libomp install through brew(brew install libomp) |
So the latest solution seems to not require cmake. You just need libomp and pip:
|
Please refer to the latest official installation instructions:
Locking this conversation to avoid any further confusion. Feel free to open new issue if you still cannot install LightGBM on macOS after reading links above. |
For Mac Users
The 2nd of May
gcc-8
was released, which is a major released.Therefore, if, since then, you run
gcc-8 version will be installed:
ISSUE
If the lightGBM version you have was built with
gcc-7
, when you try to load it now you might get:SOLUTION
I came around this error by installing it from source doing:
and then
By the way, similar issue will happen to
xgboost
.If someone thinks this is more for stackoverflow I am happy to remove it from here immediately
Cheers
The text was updated successfully, but these errors were encountered: