解决在win10找不到site-packages\torch\lib\shm.dll“ or one of its dependencies 问题

环境:win10

工具:pycharm

运行yolov11的测试时报错:找不到site-packages\torch\lib\shm.dll" or one of its dependencies

本来顺着这个问题发现都让重新装pytorch,找到下载链接

download.pytorch.org/whl/torch_stable.html,打开就一堆,百思不得其舒服解

并且我懒,so......faint......我不打算这么做。

于是改换思路,单独启动torch,import torch,发现依旧报错

但错误变成了:OMP: Error #15: Initializing libomp.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://openmp.llvm.org/

找到知乎的帖子(感谢这位博主)(22 封私信 / 30 条消息) 关于OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.错误解决方法 - 知乎 (zhihu.com)

本问题出现主要是因为pytorch包中包含了名为libiomp5md.dll的文件 ,与Anaconda环境中的同一个文件出现了某种冲突,所以需要删除一个。

删除多余的dll文件,我的文件是env下的虚拟环境的文件。发现有时候见山不是山,希望能帮助一些人。

相关推荐
emo_2b19 小时前
Pycharm配置conda解释器时遇到的问题及解决方法
linux·pycharm·conda
Είναι η κοπέλα20 小时前
模型量化完全指南:GGUF、GPTQ、AWQ 怎么选
人工智能·pytorch·python
Soonyang Zhang2 天前
根据时戳从pytorch trace中获取kernel信息
pytorch
承渊政道2 天前
【从零开始大模型开发与微调:基于PyTorch与ChatGLM】(开源大模型ChatGLM使用详解)
人工智能·pytorch·开源·llm·chatglm
129Lab3 天前
电池热管理仿真的AI加速:用Python+PINN物理信息神经网络替代传统CFD的可行性探索
pytorch·python·cfd·pinn·物理信息神经网络·仿真加速·电池热管理
Είναι η κοπέλα3 天前
llama.cpp 与 GGUF 格式:本地大模型的“裸引擎“
开发语言·人工智能·pytorch·python·conda
头发够用的程序员3 天前
TensorRT 自定义算子插件实战(三):手搓 2×2 最大池化 customMaxpool
人工智能·pytorch·python·深度学习·神经网络·边缘计算·jetson
for_ever_love__4 天前
PyTorch 张量与 autograd——自动求导怎么工作
pytorch·python·深度学习·自动求导
Είναι η κοπέλα5 天前
显存计算与模型选择:你的显卡能跑多大的模型
人工智能·pytorch·python·开源·conda
Escalating_xu5 天前
【Python】使用库:标准库、第三方库、pip、项目实战与程序打包
java·python·pip