关于在jupyter notebook中的imshow之后“内核似乎挂掉了”的解决方案

1.症状

用matplotlib或者cv2里面的那个imshow之后,jupyter notebook直接“内核似乎挂掉了,他很快将自动重启”

然后conda的prompt里面是这样的:

2.分析(不想看可以忽略)

上面的prompt的意思如下:

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

CN:错误#15:正在初始化libiomp5md.dll,但发现libiomp5md.dll已经初始化了。

•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.

CN:注意!这意味着 OpenMP 运行时的多个副本已link到程序里。 这是危险的,因为它会降低性能或直接炸掉程序。

•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.

CN:最好只让一个 OpenMP链接到运行时的进程中,比如通过避免在任何lib中静态link到OpenMP。

•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.

CN:或者可以可以设置环境变量 KMP_DUPLICATE_LIB_OK=TRUE强行整出来结果。但这可能会导致干掉你的进程(比如现在)或悄咪咪地瞎输出莫名其妙的结果。

•For more information, please see http://www.intel.com/software/products/support/.

CN:你也可以看看intel的一个support

结论就是,libiomp5md.dll重复初始化了,所以让一个消失就行了。

3.解决方案

搜索这个dll,如图

别删错了,deeplearnings是我的环境,你自己环境叫啥名就找对应的,然后把Library\bin下面的那个libiomp5md.dll删掉就行(别TM把整个bin文件夹删掉!)

完事了

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值