【问题标题】:Jupyter server crashed. Unable to connect. Error code from jupyter: 1"Jupyter 服务器崩溃。无法连接。来自 jupyter 的错误代码:1"
【发布时间】:2019-09-18 00:23:06
【问题描述】:

尝试在 VS Code 中运行 python 交互式窗口时,我不断收到此错误消息。我在另一台笔记本电脑上试过这个没有问题,但由于某种原因,它发生在我的另一台笔记本电脑上。错误信息是:

"Executing code failed : Error: Jupyter server crashed. Unable to connect. 
Error code from jupyter: 1"

我试过卸载VS Code,卸载python扩展,在线研究错误代码,但没有运气。

【问题讨论】:

  • 也许你已经在端口 8888 上运行了一些东西,Jupyter 默认使用该端口。不过我对此表示怀疑。
  • 如何检查?
  • 嘿@sethtjf。我是这个扩展的开发者。我有几件事可以帮助诊断。 1. 首先,当您使用交互式窗口时,您将从 VSCode 中选择的 python 环境启动 jupyter。在 vscode 之外(通过类似命令)使用相同的环境时,您可以运行 jupyter notebook 并获得有效的服务器吗? 2. 如果你对#1 的回答是肯定的,你是否也可以在VSCode 中查看你的控制台日志。只需尝试运行交互式窗口并复制您在控制台窗口中的 Help->Toggle Developer Tools 中看到的内容。
  • 您好伊恩,感谢您的回复。我无法从命令行启动 jupyter 并连接到服务器。

标签: python visual-studio-code jupyter


【解决方案1】:

我遇到了类似的问题。我必须在 VSCODE 命令面板中配置一个设置。

“Python:选择解释器来启动 Jupyter 服务器”

并选择安装了 Jupyter 的环境,以允许 vscode 启动服务器。

https://github.com/microsoft/vscode-python/issues/11048(见 4 月 9 日的评论)

【讨论】:

    【解决方案2】:

    只需配置“Jupyter Notebook”,启动“jupyter notebook”。

    更多信息:https://blog.csdn.net/weixin_34238642/article/details/91363525

    enter image description here

    【讨论】:

    • 没有意义的答案。
    猜你喜欢
    • 2020-04-19
    • 1970-01-01
    • 1970-01-01
    • 2021-03-02
    • 2022-09-30
    • 1970-01-01
    • 2021-01-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多