一、错误描述

安装 CUDA 后,在 Visual Studio Code 中使用 jupyter notebook,无论是使用 TensorFlow 或者 PyTorch,涉及 Model 相关的代码时,会报错:

info 10:44:12.758: kill daemon
error 10:44:12.758: Raw kernel process exited code: 3221226505
error 10:44:12.768: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were doneat t.KernelShellFutureHandler.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:32353)at c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:51405at Map.forEach (<anonymous>)at y._clearKernelState (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:51390)at y.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:44872)at c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:251157at t.swallowExceptions (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:29:120529)at dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:251135)at t.RawSession.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:24:256072)at processTicksAndRejections (node:internal/process/task_queues:96:5)]
warn 10:44:12.771: Cell completed with errors {message: 'Canceled future for execute_request message before replies were done'
}

(一)提醒

翻看 log 中 error 的前文,CUDA 和 cuDNN 是可以被调起的。

warn 10:44:12.276: StdErr from Kernel Process 2022-07-27 10:44:12.27561
warn 10:44:12.276: StdErr from Kernel Process 7: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384]
warn 10:44:12.277: StdErr from Kernel Process  Loaded cuDNN version 8401error 10:44:12.756: Disposing session as kernel process died ExitCode: 3221226505, Reason: c:\Users\Eddie\AppData\Local\Programs\Python\Python39\lib\site-packages\traitlets\traitlets.py:2392: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.warn(
c:\Users\Eddie\AppData\Local\Programs\Python\Python39\lib\site-packages\traitlets\traitlets.py:2346: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '59483b09-e83e-4bf0-a9b6-82301995d744' instead of 'b"59483b09-e83e-4bf0-a9b6-82301995d744"'.warn(
2022-07-27 10:44:06.428210: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-07-27 10:44:07.682221: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1335 MB memory:  -> device: 0, name: NVIDIA GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1
2022-07-27 10:44:12.275617: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8401

仔细看 error 中的内容,似乎错误出在 jupyter 上,但其实不然。

error 10:44:12.768: Error in waiting for cell to complete [Error: Canceled future for execute_request message before replies were doneat t.KernelShellFutureHandler.dispose (c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:32353)at c:\Users\Eddie\.vscode\extensions\ms-toolsai.jupyter-2022.6.1201981810\out\extension.node.js:2:51405

二、解决方法

(一)使用浏览器运行 jupyter 查看错误(建议跳过)

此步骤建议跳过!在此解释只为记录完整的错误解决步骤。

使用命令安装 jupyter,

pip install jupyter

在浏览器中打开 .ipynb 文件,重新运行,出现与在 Visual Studio Code 中不一样的错误:

Could not locate zlibwapi.dll

(二)安装 Zlib

参照 NVIDIA CUDNN DOCUMENTATION 安装 Zlib,问题解决!


三、参考

  • Could not locate zlibwapi.dll. Please make sure it is in your library path
  • tensorflow出现报错: Could not locate zlibwapi.dll或者Could not load library cudnn_cnn_infer64_8.dll.

解决 error: Raw kernel process exited code: 3221226505相关推荐

  1. etcd.service: main process exited, code=exited, status=203/EXEC

    部署ETCD异常解决 # 查看日志 [root@m2 pki]# journalctl -xe-- Subject: Unit etcd.service has failed -- Defined-B ...

  2. centos7 SSH服务启动时报“main process exited, code=exited”status 255错误

    服务器长久不访问今日ssh居然无法连接,客户端报错1(上部分),重启主机后报错2(下部分) └─# ssh 172.16.30.56 kex_exchange_identification: read ...

  3. k8s-重启kubelet服务异常 kubelet.service: main process exited, code=exited, status=1/FAILURE

    多重启几遍

  4. Reids报错解决:Job for redis-server.service failed because the control process exited with error code.

    此文首发于我的个人博客:Reids报错解决 Job for redis-server.service failed because the control process exited with er ...

  5. Docker启动报错:Job for docker.service failed because the control process exited with error code. See “sy

    本文转载自博客园作者:蜗牛coder,点击前往原文 本机环境是VMware Workstation上安装的CentOS7.然后下载Docker. DOCKER启动失败Job for docker.se ...

  6. Job for postfix.service failed because the control process exited with error code. See systemctl st

    CentOS 7.2 启动postfix的时候报错: [root@ ~]# systemctl start postfix Job for postfix.service failed because ...

  7. 已解决:启动docker报错:“Job for docker.service failed because the control process exited with error”解决办法

    启动docker时报错 [root@localhost ~]# systemctl start docker Job for docker.service failed because the con ...

  8. 关于Job for network.service failed because the control process exited with error code.

    重启网络出现报错 Job for network.service failed because the control process exited with error code. See &quo ...

  9. Job for smbd.service failed because the control process exited with error code. See “systemctl statu

    错误 $ sudo service smbd restartJob for smbd.service failed because the control process exited with er ...

  10. jenkins启动报错 Job for jenkins.service failed because the control process exited with error code.

    启动时若提示下述内容,则表示启动失败 Job for jenkins.service failed because the control process exited with error code ...

最新文章

  1. 用Numpy搭建神经网络第二期:梯度下降法的实现
  2. 能实现自控的那天,再考虑其他
  3. java拷贝文件权限_boto3 copy vs copy_object关于s3中的文件权限ACL
  4. js中货币格式化方法
  5. php二维数组中的查找,PHP实现二维数组中的查找算法小结
  6. 【cocos2d-x】游戏构成要素③----游戏关卡的实现
  7. YOLOv1-YOLOv4
  8. php5.6 mysql nginx_nginx1.10.3+php5.6+mysql5.7.0
  9. java 风车_Java兴趣编程-转动的大风车
  10. 通过v$sqlarea,v$sql查询最占用资源的查询
  11. 网络数据库的复制和同步(一)
  12. MyBatis官方文档——XML映射文件部分
  13. 数字化转型案例:美的集团
  14. 啦啦外卖独立版41.4+全插件+可运营版本+开源(亲测100%可用)
  15. 案例三:小明左右手分别拿两张纸牌:黑桃10和红心8,现在交换手中的牌。编写一个程序模拟这一个过程:两个整数分别保存在两个变量中,将这两个变量的值互换,并输出互换后的结果。...
  16. springboot word excel ppt 图片aspose 转换PDF 在线预览
  17. gzip already installed and latest version解决方法
  18. VScode打不开浏览器方法总结
  19. no suitable HttpMessageConverter found for response type 异常
  20. excel怎么把两个表格合成一个

热门文章

  1. 闪迪U盘插入电脑后,系统能识别到插入,但在我的电脑中没有显示的解决方法
  2. vTestStudio:变体Variant初理解
  3. 请简述计算机主板的基本组成部分,科技知识:计算机主板的基本组成部分
  4. 端口映射不能访问80端口
  5. java怎么获取观看记录_java – 在Android手机上获取用户行为(应用历史记录,浏览历史记录等)...
  6. 手机内存小可用内存卡代替吗?
  7. 计算机播放音乐自录,怎么录制电脑上正在播放的视频音频
  8. 不得不说的FUP P4K血型卡专用离心机
  9. [转载]世界各个地区WIFI 2.4G及5G信道划分表(附无线通信频率分配表)
  10. 分享打造爆款书的方法,同时聊聊出版图书中的哪些事和哪些坑