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

Segmentation fault: 11 with lightGBM 3.3.0 in Mac Big Sur #4707

Closed
jrzaurin opened this issue Oct 22, 2021 · 2 comments
Closed

Segmentation fault: 11 with lightGBM 3.3.0 in Mac Big Sur #4707

jrzaurin opened this issue Oct 22, 2021 · 2 comments

Comments

@jrzaurin
Copy link

Description

Simply, a fresh install in my system won't run fit throwing a Segmentation fault: 11 error.

Not sure is a bug or simply my installation and/or laptop

Reproducible example

>>> import numpy as np
>>> import lightgbm as lgb
>>> x = np.random.rand(100, 5)
>>> y = np.random.choice(2, 100)
>>> model = lgb.LGBMClassifier()
>>> model.fit(x, y)
Segmentation fault: 11

Environment info

OS: mac OS Big Sur 11.6
python versions: 3.7.9, 3.8.9 and 3.9.5 (environments created via pyenv virtualenv 3.9.5 lgb_test_py39 for example. The env has installed only LightGBM

I recently updated OS and run brew updgrade so just in case it helps:

brew info libomp
libomp: stable 13.0.0 (bottled)
LLVM's OpenMP runtime library
https://openmp.llvm.org/
/usr/local/Cellar/libomp/13.0.0 (9 files, 1.6MB) *
  Poured from bottle on 2021-10-04 at 19:41:11
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/libomp.rb
License: MIT
==> Dependencies
Build: cmake ✔
==> Analytics
install: 127,588 (30 days), 281,902 (90 days), 1,175,119 (365 days)
install-on-request: 15,038 (30 days), 33,932 (90 days), 139,457 (365 days)
build-error: 0 (30 days)

LightGBM version or commit hash:

>>> lgb.__version__
'3.3.0'

Command(s) you used to install LightGBM

pip install lightgbm
@StrikerRUS
Copy link
Collaborator

@jrzaurin Hey, thanks for using LightGBM!

Unfortunately, libomp>=12 on macOS contains a bug, and LightGBM is not compatible with it. Please, use one of the following workarounds: #4229 (comment) or #4229 (comment).

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants