yolov5中OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

项目场景:

yolov5使用test.py报错`


问题描述

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.
请添加图片描述


原因分析:

在初始化 libiomp5md.dll,发现 libiomp5md.dll 已经初始化。


解决方案:

##方法一:提前删除libiomp5md.dll

##方法二:设置环境变量以允许程序继续进行`

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

你可能感兴趣的:(yolov5,opencv,目标检测)