解决在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下的虚拟环境的文件。发现有时候见山不是山,希望能帮助一些人。

相关推荐
All The Way North-1 天前
【完形填空实战】BERT中文MLM微调:数据构造→训练→评估,有完整可运行代码
pytorch·bert·预训练模型·transformers·模型微调·mlm·完形填空
Li Ming&1 天前
Python办公自动化:利用Python批量将PDF转换为图片文件
python·pdf·pip
拥抱太阳06161 天前
HarmonyOS 应用开发《掌上英语》第6篇-资源管理最佳实践多模块资源复用
pytorch·深度学习·harmonyos
YOLO数据集集合1 天前
果蔬视觉识别数据集全量使用指南|计算机视觉图像分类工程落地|PyTorch迁移学习训练全流程
pytorch·计算机视觉·分类
承渊政道1 天前
【从零开始大模型开发与微调:基于PyTorch与ChatGLM】(从退化问题到信息高速公路:ResNet残差网络实战拆解)
网络·人工智能·pytorch·深度学习·resnet·chatglm·卷积
大鹏的NLP博客2 天前
深度学习模型PyTorch与ONNX数值一致性校验通用技术报告
人工智能·pytorch·深度学习·onnx
FriendshipT2 天前
Ultralytics:解读BNContrastiveHead模块
人工智能·pytorch·python·深度学习·目标检测
程序员羽痕2 天前
基于深度学习的眼疾识别系统
人工智能·pytorch·深度学习·分类·django
liang89993 天前
Anconda常用命令
linux·人工智能·conda
weigangwin3 天前
Graphiti 时间知识图谱:从 pip 安装到事实有效期验证
人工智能·知识图谱·pip