Jupyter Notebook运行中内核挂掉
Jupyter Notebook运行中内核挂掉了
有人说可能是版本冲突,由于我的都是最新版本,因此更新版本并未解决该问题。
最后发现有人通过这行代码解决了
import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
我也试了试,发现......
我加了这一句之后也能跑了,哈哈哈哈哈。
至于什么原理,日后在更。
我回来啦,似乎其作用是允许加载并运行多个OpenMP
- 根据stackoverflow上的回答:
KMP_DUPLICATE_LIB_OK
=True
tells OpenMP(多进程并发API) to not complain if it notices that two copies of OpenMP are loaded. This doesn't necessarily mean it will work, but it does mean it won't stop you from trying to make it work. - 根据pytorch论坛上的回答: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.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App