内核以退出代码 1(VS 代码)死亡 [英] Kernel died with exit code 1(VS code)
问题描述
这是我在 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="main") 文件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) 解释器.
我通过以下方式解决了这个问题:
- 打开 Anaconda 导航器
- 使用顶部的菜单切换到正确的 conda 环境
- 从 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:
- Opening Anaconda Navigator
- Switching to the correct conda environment with the menu at the top
- Opening VS Code from the Anaconda navigator
For some reason, this made the interactive window work again.
这篇关于内核以退出代码 1(VS 代码)死亡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!