当前位置:网站首页>Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
Deoldify项目问题——OMP:Error#15:Initializing libiomp5md.dll,but found libiomp5md.dll already initialized.
2022-07-06 09:13:00 【zkkkkkkkkkkkkk】
目录
一、报错信息
完整报错如下:
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll 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/.
二、原因
新建虚拟环境,然后运行程序时报错。上网查找原因是在虚拟环境下存在了两个libiomp5md.dll文件。一个是在pytorch包里的,而另一个是在虚拟环境所在目录的位置中。很奇怪这两个文件。
三、解决方法
上网查看相关的文章博客,总结了两种方法。
1)代码解决
在报错的Python脚本中使用os模块,加入环境变量。代码如下:
import os
os.environ['KMP_DUPLICATE_LIB_OK'] = "TRUE"
2)手动解决
将已经存在的两个libiomp5md.dll删除一个(建议使用第一种方法,因为谁也不知道删完之后会不会影响别的包,进而引发其他错误)
边栏推荐
- API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
- Texttext data enhancement method data argument
- Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
- 【博主推荐】C# Winform定时发送邮箱(附源码)
- CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
- Mysql21 - gestion des utilisateurs et des droits
- MySQL24-索引的数据结构
- Mysql21 user and permission management
- Mysql25 index creation and design principles
- CSDN question and answer tag skill tree (I) -- Construction of basic framework
猜你喜欢
MySQL28-数据库的设计规范
Some problems in the development of unity3d upgraded 2020 VR
MySQL22-逻辑架构
[recommended by bloggers] background management system of SSM framework (with source code)
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
CSDN问答标签技能树(一) —— 基本框架的构建
How to change php INI file supports PDO abstraction layer
【博主推荐】asp.net WebService 后台数据API JSON(附源码)
Asp access Shaoxing tourism graduation design website
Mysql21 user and permission management
随机推荐
SSM整合笔记通俗易懂版
Global and Chinese market of wafer processing robots 2022-2028: Research Report on technology, participants, trends, market size and share
NPM an error NPM err code enoent NPM err syscall open
MySQL 20 MySQL data directory
MySQL27-索引優化與查詢優化
C language string function summary
How to find the number of daffodils with simple and rough methods in C language
MySQL22-逻辑架构
Texttext data enhancement method data argument
[recommended by bloggers] asp Net WebService background data API JSON (with source code)
Valentine's Day is coming, are you still worried about eating dog food? Teach you to make a confession wall hand in hand. Express your love to the person you want
MySQL23-存储引擎
导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法
虚拟机Ping通主机,主机Ping不通虚拟机
Ansible实战系列三 _ task常用命令
Mysql33 multi version concurrency control
MySQL24-索引的数据结构
Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
[recommended by bloggers] C WinForm regularly sends email (with source code)
【博主推荐】C#生成好看的二维码(附源码)