我是 python 新手,想在我的 macbook 上安装lightgbm 。我做了一个pip install lightgbm
,它说安装成功。但是,当我尝试将其导入笔记本时,我收到以下错误消息:
../anaconda/envs/python3/lib/python3.6/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
342
343 if handle is None:
--> 344 self._handle = _dlopen(self._name, mode)
345 else:
346 self._handle = handle
OSError: dlopen(../anaconda/envs/python3/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: ../anaconda/envs/python3/lib/python3.6/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found
lightgbm 网站上的文档使用brew install...
. 我的问题是我是否必须进行 brew 安装?如果是这种情况,为什么 pip 安装显示安装成功呢?