libomp
macOS ์์ XGBoost, LightGBM ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ ๋จ
โ pip install ์ ํด๋์๋๋ฐ, ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์คํ๋์ง ์์ ๊ฒ์ ์ฒ์์ด์๋ค. ํจํค์ง๋ฅผ ์ค์นํ๊ณ ๋ช ๋ น์ด๋ฅผ ์คํํ๋๋ฐ
Traceback (most recent call last):
File "", line 1, in
File "/Users/fakenerd/.envs/env-with-lightgbm/lib/python3.6/site-packages/lightgbm/__init__.py", line 8, in
from .basic import Booster, Dataset
File "/Users/fakenerd/.envs/env-with-lightgbm/lib/python3.6/site-packages/lightgbm/basic.py", line 32, in
_LIB = _load_lib()
File "/Users/fakenerd/.envs/env-with-lightgbm/lib/python3.6/site-packages/lightgbm/basic.py", line 27, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/__init__.py", line 426, in LoadLibrary
return self._dlltype(name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/()/.envs/env-with-lightgbm/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/()/.envs/env-with-lightgbm/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found
์ผ๋จ OSError ๋๊ฑธ ์์๋ค. ์๊ฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ microsoft ์ ๊ฒ์ด๋๊ฒ ์๊ฐ๋๋ฉด์, ์ด๋ฐ์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์คํ ์ ๋๊ฒ ์ฒ์์ด๋ผ๋ ๋นํน๊ฐ์ ์์ด์ง๊ณ , ์ผ์ด๋ ์ผ์ด ์ผ์ด๋ฌ๋ค๊ณ ์๊ฐ์ด ๋ค๋ฉด์ ์นจ์ฐฉํด์ก๋ค.
gcc version trouble
โ ๋ด MacOS ์ gcc version ์ 8 ์ด์ง๋ง, ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ gcc ์ปดํ์ผ๋ฌ ๋ฒ์ ผ์ด 7์ด๋ผ๋ closed issue ๋ฅผ ์ฐพ์ ์ ์์๋ค. MS/LightGBM issue#1369
โ MS ์์ ์ฒ์์ ์ ์ํ๊ฑด ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ง์ฐ๊ณ , git ๋ ํฌ์งํ ๋ฆฌ์์ clone ํด์ ์ง์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์นํ๊ณ cmake ํ๊ณ ๋๋ ํ ๋ฆฌ ์๋ก ์ค์ ํ๊ณ ์ด์ฉ๊ตฌ ์ ์ฉ๊ตฌ;;
โ ๊ทธ๋ ์ง๋ง ์ง๊ธ์ ์คํ์์ค์ ์๋. Issue comment ๋งจ ๋ฐ์ ์ฆ์ ๊ตฌ์๊ฐ์ ํ ๋ฌธ์ฅ
$ brew install libomp
โ ์ค์ ๋ก brew ๋ก libomp ํจํค์ง ์ค์นํ์๋ง์ ๋ชจ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์ ์์ ์ผ๋ก loaded ๋์๋ค;;
๊ตํ
โ ๋ ์ฌ์ด ๋ฐฉ๋ฒ์ด ์๋ค... ๋...
Last updated
Was this helpful?