Jupyter notebook kernel died… why?
问题:
在jupyter notebook里面用了
cv2.imshow()
cv2.waitKey(0)
然后在图片窗口弹出,按下任意键后,窗口无响应,点x
想关闭窗口也没有响应,then有两个选项:force quit
or wait
。
如果选了force quit
,就会jupyter notebook kernel died
,只能restart kernel
才能继续运行别的代码。
解决方法
-
最后加cv2.destroyAllWindows()
cv2.imshow('dstImage',img) cv2.waitKey(0)