Jupiter Notebookにおいてlightgbmを
python
1!pip install lightgbm
によりinstallしたのですが、
import lightgbm as lgb
しようとすると以下のエラーが出ます。ネット上にも同じような例があって試したのですが解消できませんでした。
--------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-40-2ae3725bef24> in <module>() ----> 1 import lightgbm as lgb /anaconda/lib/python3.6/site-packages/lightgbm/__init__.py in <module>() 6 from __future__ import absolute_import 7 ----> 8 from .basic import Booster, Dataset 9 from .callback import (early_stopping, print_evaluation, record_evaluation, 10 reset_parameter) /anaconda/lib/python3.6/site-packages/lightgbm/basic.py in <module>() 31 32 ---> 33 _LIB = _load_lib() 34 35 /anaconda/lib/python3.6/site-packages/lightgbm/basic.py in _load_lib() 26 if len(lib_path) == 0: 27 return None ---> 28 lib = ctypes.cdll.LoadLibrary(lib_path[0]) 29 lib.LGBM_GetLastError.restype = ctypes.c_char_p 30 return lib /anaconda/lib/python3.6/ctypes/__init__.py in LoadLibrary(self, name) 424 425 def LoadLibrary(self, name): --> 426 return self._dlltype(name) 427 428 cdll = LibraryLoader(CDLL) /anaconda/lib/python3.6/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error) 346 347 if handle is None: --> 348 self._handle = _dlopen(self._name, mode) 349 else: 350 self._handle = handle OSError: dlopen(/anaconda/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/8/libgomp.1.dylib Referenced from: /anaconda/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so Reason: image not found
どなたかお助けいただけないでしょうか?
単純にはPyhtonバインディングだけ入れてlightgbmそのものをインストールしてないのでは、と思ってしまうので、やったことを全部書いた方がいいかと。

回答2件
あなたの回答
tips
プレビュー