内核以退出代码 1(VS 代码)死亡 [英] Kernel died with exit code 1(VS code)

查看:32
本文介绍了内核以退出代码 1(VS 代码)死亡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在 vs 代码中的交互式窗口中运行代码时显示的错误消息:

C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2195:FutureWarning:在 traitlets 5.0 中不推荐支持额外的 Unicode 引号.使用hmac-sha256"代替hmac-sha256"– 或使用 CUnicode.警告( C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2150: FutureWarning: 在 traitlets 5.0 中不推荐支持额外的 Bytes 引号.使用 '8fe74386-11f1-4831-b37d-5582442edf8a' 而不是 'b'8fe74386-11f1-4831-b37d-5582442edf8a'''.warn( Traceback (最近一次调用): File "c:\Users\rohit.vscode-toolsaiter.-2021.5.702919634\pythonFiles\vscode_datascience_helpers..\pyvsc-run-isolated.py", line 30, in runpy.run_path(module, run_name="ma​​in") 文件F:\Anaconda\lib\runpy.py", line 265, in run_path return _run_module_code(code, init_globals, run_name, File "F:\Anaconda\lib\runpy.py", line 97, in _run_module_code _r...


我尝试重新安装 VS 代码(在另一个驱动器 F: 中).我正在使用 python(conda) 解释器.

解决方案

我通过以下方式解决了这个问题:

  1. 打开 Anaconda 导航器
  2. 使用顶部的菜单切换到正确的 conda 环境
  3. 从 Anaconda 导航器打开 VS Code

出于某种原因,这使交互式窗口再次工作.

This is the error message displayed when I run the code in Interactive window in vs code:

C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2195: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode. warn( C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2150: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '8fe74386-11f1-4831-b37d-5582442edf8a' instead of 'b"8fe74386-11f1-4831-b37d-5582442edf8a"'. warn( Traceback (most recent call last): File "c:\Users\rohit.vscode\extensions\ms-toolsai.jupyter-2021.5.702919634\pythonFiles\vscode_datascience_helpers..\pyvsc-run-isolated.py", line 30, in runpy.run_path(module, run_name="main") File "F:\Anaconda\lib\runpy.py", line 265, in run_path return _run_module_code(code, init_globals, run_name, File "F:\Anaconda\lib\runpy.py", line 97, in _run_module_code _r...


I tried re-installing VS code (In another DRIVE F:). I am using python(conda) interpreter.

解决方案

I fixed this by:

  1. Opening Anaconda Navigator
  2. Switching to the correct conda environment with the menu at the top
  3. Opening VS Code from the Anaconda navigator

For some reason, this made the interactive window work again.

这篇关于内核以退出代码 1(VS 代码)死亡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆