当前位置:网站首页>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删除一个(建议使用第一种方法,因为谁也不知道删完之后会不会影响别的包,进而引发其他错误)
边栏推荐
- February 13, 2022-3-middle order traversal of binary tree
- 记一次某公司面试题:合并有序数组
- SSM整合笔记通俗易懂版
- Swagger、Yapi接口管理服务_SE
- CSDN博文摘要(一) —— 一个简单的初版实现
- MySQL25-索引的创建与设计原则
- Mysql21 - gestion des utilisateurs et des droits
- February 13, 2022-2-climbing stairs
- [leectode 2022.2.13] maximum number of "balloons"
- IDEA 导入导出 settings 设置文件
猜你喜欢
【博主推荐】C#生成好看的二维码(附源码)
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
Unicode decodeerror: 'UTF-8' codec can't decode byte 0xd0 in position 0 successfully resolved
Mysql30 transaction Basics
API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
[recommended by bloggers] C MVC list realizes the function of adding, deleting, modifying, checking, importing and exporting curves (with source code)
CSDN question and answer module Title Recommendation task (II) -- effect optimization
Installation and use of MySQL under MySQL 19 Linux
Copie maître - esclave MySQL, séparation lecture - écriture
随机推荐
Texttext data enhancement method data argument
CSDN blog summary (I) -- a simple first edition implementation
Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
Discriminant model: a discriminant model creation framework log linear model
Postman uses scripts to modify the values of environment variables
Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
A trip to Macao - > see the world from a non line city to Macao
Asp access Shaoxing tourism graduation design website
【博主推荐】C# Winform定时发送邮箱(附源码)
CSDN question and answer tag skill tree (II) -- effect optimization
MySQL20-MySQL的数据目录
February 13, 2022 - Maximum subarray and
windows下同时安装mysql5.5和mysql8.0
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
解决:log4j:WARN Please initialize the log4j system properly.
Django运行报错:Error loading MySQLdb module解决方法
MySQL22-逻辑架构
Solution: log4j:warn please initialize the log4j system properly
MySQL主從複制、讀寫分離
【博主推荐】C#生成好看的二维码(附源码)