当前位置:网站首页>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删除一个(建议使用第一种方法,因为谁也不知道删完之后会不会影响别的包,进而引发其他错误)
边栏推荐
- frp内网穿透那些事
- SSM integrated notes easy to understand version
- Ansible实战系列二 _ Playbook入门
- Mysql30 transaction Basics
- Development of C language standard
- MySQL25-索引的创建与设计原则
- [paper reading notes] - cryptographic analysis of short RSA secret exponents
- Ansible practical Series III_ Task common commands
- Generate PDM file from Navicat export table
- Data dictionary in C #
猜你喜欢
MySQL24-索引的数据结构
CSDN问答模块标题推荐任务(二) —— 效果优化
CSDN问答标签技能树(一) —— 基本框架的构建
Idea import / export settings file
[recommended by bloggers] C WinForm regularly sends email (with source code)
CSDN Q & a tag skill tree (V) -- cloud native skill tree
Postman Interface Association
[ahoi2009]chess Chinese chess - combination number optimization shape pressure DP
C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
Copie maître - esclave MySQL, séparation lecture - écriture
随机推荐
Postman environment variable settings
MySQL24-索引的数据结构
Esp8266 at+cipstart= "", "", 8080 error closed ultimate solution
CSDN问答标签技能树(一) —— 基本框架的构建
Why is MySQL still slow to query when indexing is used?
Asp access Shaoxing tourism graduation design website
Windows cannot start the MySQL service (located on the local computer) error 1067 the process terminated unexpectedly
MySQL21-用戶與權限管理
Principes JDBC
JDBC原理
Ansible实战系列二 _ Playbook入门
SSM integrated notes easy to understand version
MySQL23-存储引擎
How to find the number of daffodils with simple and rough methods in C language
Data dictionary in C #
windows下同时安装mysql5.5和mysql8.0
Database middleware_ MYCAT summary
La table d'exportation Navicat génère un fichier PDM
LeetCode #461 汉明距离
导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法