报错:OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.

简介: 报错:OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized.

问题描述:


OMP: Error #15: Initializing libiomp5.dylib, but found libiomp5.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.


解决方案:


import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"


If you are using Python distributed by Conda, then it is highly likely that the error is caused by the numpy package from Conda which includes the mkl package which in turn conflicts with the system-wide library. In this case you can update the numpy package in Conda or replace the Conda’s OpenMP library instance with system-wide one by creating a symlink to it in Conda environment folder $CONDA_PREFIX/lib.

如果Python是基本于Conda安装的,则Conda上的numpy包中的mkl很容易与系统内库发生冲突,可选择update numpy package in Conda或者设置为系统库。


通过降低matplotlib的版本,即conda install matplotlib=2.2.3来解除阻塞

目录
相关文章
Linux 数据安全/隐私保护 Shell
Ubuntu 开发工具 计算机视觉
RK3588 RGA 图像操作
RK3588 RGA 图像操作
3320 0
Linux C语言
Linux These critical programs are missing or too old: compiler
Linux These critical programs are missing or too old: compiler
3711 0
Linux These critical programs are missing or too old: compiler
存储 开发工具 Docker
Docker数据目录迁移解决方案
在docker的使用中随着下载镜像越来越多,构建镜像、运行容器越来越多, 数据目录必然会逐渐增大;当所有docker镜像、容器对磁盘的使用达到上限时,就需要对数据目录进行迁移。
14955 1
12月前
2026最新丨1688新手开店必做的操作指南,运营自学全流程!
2025倒计时开启,计划在1688开店?本文为新手商家梳理八大必备操作:完善企业信息、下载商家工具、关联收款账户、开通买家保障与先采后付、设置自动回复、配置运费模板、持续上新商品。从信任建立到服务优化,助力新店快速提升竞争力,获取平台流量支持。细节决定成败,专业成就未来,掌握【1688超级运营成长手册】,实现店铺持续增长!
3178 0
9月前
|
数据采集 数据可视化 安全
JBoltAI工业数智化 SOP:视频化作业指导的技术与落地
JBoltAI工业数智化SOP平台以视频化作业指导为核心,解决传统纸质SOP理解难、执行不一、培训低效、更新滞后等痛点。支持制作、审核、管理、分发全流程,具备像素级编辑、硬件加速合成、多端响应式访问及私有化部署能力,助力制造业标准化、知识沉淀与高效转型。(239字)
420 0
12月前
|
API Docker 异构计算
从 Docker Run 到生产级部署:vLLM推理大模型服务的 Docker Compose 完整实战指南
本文详解如何将vLLM大模型推理服务从基础docker run升级为生产级Docker Compose部署。涵盖GPU支持、网络隔离、配置参数化、API优化与压测实践,解决命名冲突、环境混乱等痛点,助力AI/DevOps工程师构建可维护、可扩展的容器化推理平台。
2630 6
人工智能 关系型数据库 分布式数据库
2025阿里云双十一数据库优惠全攻略:普惠价享世界纪录性能
云原生数据库PolarDB以每分钟20.55亿笔交易和单位成本0.8元人民币的极致性价比,创下TPC-C全球新纪录,如今双十一以更亲民价格服务广大开发者。
703 1
存储 算法 Unix
文件系统基础 (二)——文件的物理结构
文件系统基础 (二)——文件的物理结构
1626 1
Ubuntu 计算机视觉 C++
Ubuntu 20.04 编译 Opencv 4.11,详细步骤(带图)及报错解决,我的踩坑之旅~
Ubuntu 20.04 编译 Opencv 4.11,详细步骤(带图)及报错解决,我的踩坑之旅~
11230 0