gpt4 book ai didi

machine-learning - 无法从 jupyter 笔记本安装 lightgbm

转载 作者:行者123 更新时间:2023-11-30 09:45:27 31 4
gpt4 key购买 nike

在 jupyter 笔记本中,我做了:

!pip3 install lightgbm

我收到以下消息:

Requirement already satisfied: lightgbm in /Users/tiger/anaconda/lib/python3.5/site-packages (2.2.1)
Requirement already satisfied: scikit-learn in /Users/tiger/anaconda/lib/python3.5/site-packages (from lightgbm) (0.18.1)
Requirement already satisfied: numpy in /Users/tiger/anaconda/lib/python3.5/site-packages (from lightgbm) (1.12.0)
Requirement already satisfied: scipy in /Users/tiger/anaconda/lib/python3.5/site-packages (from lightgbm) (0.18.1)

显示该软件包已安装。但是,当我尝试导入 lightgbm 时:

import lightgbm as lgbm

我收到以下消息:

OSError: dlopen(/Users/tiger/anaconda/lib/python3.5/site-packages/lightgbm/lib_lightgbm.so, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib
Referenced from: /Users/tiger/anaconda/lib/python3.5/site-packages/lightgbm/lib_lightgbm.so
Reason: image not found

最佳答案

安装 libomp 为我解决了这个问题(MacOS):

brew install libomp

在 Linux 中这应该是:

sudo apt install libomp-dev

关于machine-learning - 无法从 jupyter 笔记本安装 lightgbm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53236702/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com