问题遇到的现象和发生背景
运用pip install miceforest 安装完成后
输入运行import miceforest as mf
出现了报错
问题相关代码,请勿粘贴截图
import miceforest as mf
运行结果及报错内容
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/var/folders/b2/mb61jycx1cj1py_69sf14qqm0000gn/T/ipykernel_41008/3362505963.py in <module>
----> 1 import miceforest as mf
~/anaconda/anaconda3/lib/python3.9/site-packages/miceforest/__init__.py in <module>
1 from .utils import ampute_data
2 from .ImputedData import ImputedData
----> 3 from .ImputationKernel import ImputationKernel
4
5 __version__ = "5.3.0"
~/anaconda/anaconda3/lib/python3.9/site-packages/miceforest/ImputationKernel.py in <module>
15 from warnings import warn
16 from .logger import Logger
---> 17 from lightgbm import train, Dataset, cv, log_evaluation, early_stopping
18 from .default_lightgbm_parameters import default_parameters, make_default_tuning_space
19
~/anaconda/anaconda3/lib/python3.9/site-packages/lightgbm/__init__.py in <module>
6 from pathlib import Path
7
----> 8 from .basic import Booster, Dataset, Sequence, register_logger
9 from .callback import early_stopping, log_evaluation, print_evaluation, record_evaluation, reset_parameter
10 from .engine import CVBooster, cv, train
~/anaconda/anaconda3/lib/python3.9/site-packages/lightgbm/basic.py in <module>
108
109
--> 110 _LIB = _load_lib()
111
112
~/anaconda/anaconda3/lib/python3.9/site-packages/lightgbm/basic.py in _load_lib()
99 if len(lib_path) == 0:
100 return None
--> 101 lib = ctypes.cdll.LoadLibrary(lib_path[0])
102 lib.LGBM_GetLastError.restype = ctypes.c_char_p
103 callback = ctypes.CFUNCTYPE(None, ctypes.c_char_p)
~/anaconda/anaconda3/lib/python3.9/ctypes/__init__.py in LoadLibrary(self, name)
458
459 def LoadLibrary(self, name):
--> 460 return self._dlltype(name)
461
462 __class_getitem__ = classmethod(_types.GenericAlias)
~/anaconda/anaconda3/lib/python3.9/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
380
381 if handle is None:
--> 382 self._handle = _dlopen(self._name, mode)
383 else:
384 self._handle = handle
OSError: dlopen(/Users/zhangmingming/anaconda/anaconda3/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: /Users/zhangmingming/anaconda/anaconda3/lib/python3.9/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found