我已经在我的mac中安装了LightGBM,并在前面测试了一个不同的项目。
现在我在一个码头里,我的mac上有一个python3.6。一旦我将import lightgbm as lgbm添加到我的烧瓶应用程序中,我就会出错。
OSError: libgomp.so.1: cannot open shared object file: No such file or directory怎么一回事?有谁能建议一下吗?
发布于 2021-12-26 17:02:57
这对我有用,把它包括在你的文件里
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get -y install curl
RUN apt-get install libgomp1来源:https://github.com/microsoft/LightGBM/issues/2223#issuecomment-499788066
发布于 2022-07-27 15:24:57
根据yo使用的图像,您可能需要一个c++编译器,以及libgomp1。问题是Lightgbm实际上是用c++编码的,并且默认情况下,您的dockerfile的基本映像可能没有安装所有依赖项(而您的mac已经安装了)。
遵循这些链接
( https://raw.githubusercontent.com/Microsoft/LightGBM/master/docker/dockerfile-cli) (https://github.com/microsoft/LightGBM/issues/2223)
解决方案是向dockerfile中添加
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
build-essential \
gcc \
g++ \
git && \
rm -rf /var/lib/apt/lists/* && \
apt-get install libgomp1 -yhttps://stackoverflow.com/questions/55036740
复制相似问题