当前位置:网站首页>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删除一个(建议使用第一种方法,因为谁也不知道删完之后会不会影响别的包,进而引发其他错误)
边栏推荐
- 1. Mx6u learning notes (VII): bare metal development (4) -- master frequency and clock configuration
- MySQL27-索引優化與查詢優化
- Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
- JDBC原理
- 导入 SQL 时出现 Invalid default value for ‘create_time‘ 报错解决方法
- Mysql25 index creation and design principles
- [recommended by bloggers] C WinForm regularly sends email (with source code)
- Ansible实战系列二 _ Playbook入门
- NPM an error NPM err code enoent NPM err syscall open
- MySQL21-用戶與權限管理
猜你喜欢
Esp8266 at+cipstart= "", "", 8080 error closed ultimate solution
MySQL20-MySQL的数据目录
【博主推荐】C#生成好看的二维码(附源码)
CSDN blog summary (I) -- a simple first edition implementation
【博主推荐】SSM框架的后台管理系统(附源码)
[recommended by bloggers] C # generate a good-looking QR code (with source code)
[ahoi2009]chess Chinese chess - combination number optimization shape pressure DP
Water and rain condition monitoring reservoir water and rain condition online monitoring
Postman Interface Association
[free setup] asp Net online course selection system design and Implementation (source code +lunwen)
随机推荐
Water and rain condition monitoring reservoir water and rain condition online monitoring
CSDN question and answer tag skill tree (II) -- effect optimization
API learning of OpenGL (2005) gl_ MAX_ TEXTURE_ UNITS GL_ MAX_ TEXTURE_ IMAGE_ UNITS_ ARB
MySQL完全卸载(Windows、Mac、Linux)
[recommended by bloggers] background management system of SSM framework (with source code)
Principes JDBC
Mysql23 storage engine
LeetCode #461 汉明距离
CSDN question and answer tag skill tree (I) -- Construction of basic framework
CSDN问答标签技能树(二) —— 效果优化
Discriminant model: a discriminant model creation framework log linear model
MySQL transaction log
csdn-Markdown编辑器
Leetcode 461 Hamming distance
CSDN问答模块标题推荐任务(一) —— 基本框架的搭建
Some problems in the development of unity3d upgraded 2020 VR
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
MySQL master-slave replication, read-write separation
MySQL24-索引的数据结构
SSM integrated notes easy to understand version