-
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
GCC version 8 not found after package install #1456
Comments
There is no |
Also your order of steps is incorrect. Firstly, build LightGBM library with this guide. Only after successful compilation you need to install Python-package:
|
Thanks. I may have been using |
I'm reopening this issue after originally closing it by thinking the problem was incorrectly assuming a version 9 for gcc in the line I double-checked everything by uninstalling and reinstalling via the following steps:
However, I still received the same error when I imported the package into the notebook:
|
You are doing everything right now , except one last step. As I said before, you need run
instead of
Installing from pip you are getting precompiled version of the LightGBM library, which comes inside the wheel from the PyPI site and requires gcc-7 (@guolinke BTW, maybe it's time to update the version?). So, all your previous steps aimed to compile the library file are just ignored. Of course, you can manually replace the library file into the Python-package in this folder |
@StrikerRUS yeah, we can update the version. |
@StrikerRUS It worked. You're right - compiling the library file is much more streamlined than the alternative. Thanks! |
I installed the package with pip (version 10.0.1) to my Python lib (version 3.6.3) on macOS Sierra (version 10.12.6), along with the dependencies found in the documentation, including open-mpi, cmake and gcc.
However, I kept receiving the following exception when I try to import the package using Jupyter notebook (version 5.0.0):
OSError: dlopen(/Users/admin/anaconda3/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/7/libgomp.1.dylib
Referenced from: /Users/admin/anaconda3/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found
brew install gcc
installed version 9, and somehow only version 8 is in the /usr/local/opt/gcc/lib/gcc folder, but the filepath above shows the package is still searching for version 7, so I kept receiving the error until I specifically downloaded version 7 and manually inserted it in the /usr/local/opt/gcc/lib/gcc/ folder.I'm confused about whether this an issue with the filepath or homebrew?
Steps to reproduce (corrected)
export CXX=g++-9 CC=gcc-9 # replace 7 with version of gcc installed on your machine
mkdir build ; cd build
cmake ..
make -j4
The text was updated successfully, but these errors were encountered: