首页 > 其他分享 >解决OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.报错问题

解决OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.报错问题

时间:2023-05-05 20:46:49浏览次数:33  
标签:路径 but dll OMP 报错 libiomp5md initialized

错误如下所示:
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/.

解决办法1:
在pycharm里调试程序时可以直接通过在程序前添加这两个语句解决

import os
os.environ[“KMP_DUPLICATE_LIB_OK”]=“TRUE”


解决办法2:
办法1不能解决问题的话,甚至直接在terminal上import torch也会出现这种问题:

究其原因其实是,anaconda的环境下存在两个libiomp5md.dll文件。所以直接去虚拟环境的路径下搜索这个文件,可以看到在环境里有两个dll文件:

 

其中第一个是torch路径下的,第二个是虚拟环境本身路径下的,转到第二个目录下把它剪切到其他路径下备份就好(最好把路径也备份一下)。

标签:路径,but,dll,OMP,报错,libiomp5md,initialized
From: https://www.cnblogs.com/jeshy/p/17375311.html

相关文章

  • 我在比较时序数据时,程序报错说数据标签有问题
    大家好,我是皮皮。一、前言前几天在Python白银群【黑白人生】问了一个Pandas数据处理的问题,这里拿出来给大家分享下。截图如下图所示:数据截图如下所示:二、实现过程这里【论草莓如何成为冻干莓】给了一个思路,如下所示:看上去还是有点深奥的。后来【瑜亮老师】也指导了一波......
  • JavaSpring学习的报错查看
    警告:Exceptionencounteredduringcontextinitialization-cancellingrefreshattempt:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'bookService'definedinclasspathresource[applicationContext.xml]:C......
  • ssh远程连接报错ssh_exchange_identification: Connection closed by remote host
    被远程主机拒绝此类报错为原因1:ssh连接数量过多导致如果问题是偶尔能登录一次,大多不能登录,建议往第一点方向排查[root@localhost~]#cat/etc/ssh/sshd_config|grepMaxSessions#MaxSessions10[root@localhost~]#cat/etc/ssh/sshd_config|grepMaxStart#MaxStartups10......
  • npm命令报错:error Unexpected token '.'; error A complete log of this run can be fo
    如果你的npm报错是这样的errorUnexpectedtoken'.'errorAcompletelogofthisruncanbefoundin:并且你你尝试过了网上各种方法不得行。那么会不会是管控版本vnm的问题呢?弄了一早上不得行;最后尝试了下nvm版本。得出结论:nvm1.1.7这个版本有问题。请升级到nvm1.1.10......
  • FAQ-virtualbox安装centOS7 报错 not syncing fatal exception
    1、假设你的虚拟机的名字为:CentOS7提示:已经建完(未启动)2、在命令行窗户执行:VBoxManagemodifyvmCentOS7--spec-ctrlonVBoxManage命令所在的目录为:c:\ProgramFiles\Oracle\VirtualBox>3、启动CentOS7......
  • feign调用报错status 404
    feign调用报错status404使用feign,报错:FeignException:status404。如下:Causedby:feign.FeignException:status404reading#; atfeign.FeignException.errorStatus(FeignException.java:62) atfeign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:91) atfe......
  • 【Redis】一次报错小记
    背景当时是这样子的,业务系统开发,当时主责开发一个模块,突然某一天,它就启动不了了,报了一个错:ERRThisinstancehasclustersupportdisabled(Redis的报错提示)嗯,就是这个东西。很迷,一直都是好的,咋突然就不行了呢?明明就没有用到redis,怎么会报这个错呢,虽然依赖里面引入了,但......
  • springboot单元测试中添加了@Autowired任然报错nullpoint(已解决)
     使用了autowired还是报错空指针异常说明就是包没有导入,springboot导包的操作在于启动application类,所以问题就在于没有单元测试时没有启动主类,解决方法:@RunWith(SpringJUnit4ClassRunner.class)@SpringBootTest(classes=SaTokenDemoApplication.class)加上如上的注解,@runwi......
  • linux find命令只输出结果 不输出报错信息
     find/-name"*filename*"2>/dev/null *filename*改成你想要查找的文件即可,模糊查找请加上相应的通配符 转自:https://blog.csdn.net/qq_35544379/article/details/111401707  ......
  • Python报错:Can't connect to HTTPS URL because the SSL module is not available
    参考文章:(32条消息)Can‘tconnecttoHTTPSURLbecausetheSSLmoduleisnotavailable-关于anaconda中的SSL模块错误_anacondahttps报错_Sky_Tree_Delivery的博客-CSDN博客具体操作:将以下文件移动位置D:\Anaconda\Library\bin->D:\Anaconda\DLLs(此处D盘为我自己的安......