【问题标题】:VS Code Jupyter Extension: Remote notebook not startingVS Code Jupyter 扩展:远程笔记本未启动
【发布时间】:2019-04-26 01:26:26
【问题描述】:

我正在尝试使用 VS Code Jupyter 扩展连接到远程 Jupyter 笔记本。

使用 CMD + Shift + P -> Jupyter: Enter the URL of local/remote Jupyter notebook 会打开一个输入字段,我在其中输入笔记本的地址。之后会显示一个要求令牌的输入字段。当我输入令牌并按 Enter 时,没有任何反应。

我尝试使用 VS Code for MacOS 和 Linux Mint 进行连接。使用托管在localhost:8888 上的笔记本,以及托管在我家庭网络192.168.0.11:8888 内另一台计算机上的笔记本。两种方式都行不通。

我可以通过浏览器访问 Jupyter 笔记本。

当我使用安装了jupyter 的 Python 环境按命令行启动 VS Code 时,我还可以(纯粹)在 VS Code 中运行笔记本。如果我没有在安装了jupyter 的 Python 环境中启动 VS Code,我将无法运行任何笔记本(但这似乎是一个已知问题)。

我该如何解决这个问题(连接到远程笔记本)?

有人可以连接到远程笔记本吗? (如果是,怎么做?)

【问题讨论】:

    标签: python visual-studio-code jupyter-notebook jupyter


    【解决方案1】:

    我遇到的问题如下

    command 'jupyter.selectExistingNotebook' not found
    

    我在 vscode 上安装了 Jupyter 扩展。 请遵循以下说明: 服务器 / Docker 上的远程 Jupyter 内核

    尝试使用此方法连接到服务器上或 Docker 容器内运行的远程 Jupyter 内核:

    启动远程 Jupyter Notebook 或无头 KernelGateway

    在 Jupyter 服务器日志的输出中找到令牌:http://jupyter-notebook.readthedocs.io/en/latest/security.html

    然后在 VS Code 中:ctrl+shift+p

    Jupyter:输入本地/远程 Jupyter Notebook 的 url

    我只安装了 docker 并运行了容器。

    【讨论】:

      【解决方案2】:

      使用以下命令:

      jupyter notebook --ip=0.0.0.0 --port=8080 --allow-root

      【讨论】:

        猜你喜欢
        • 2021-08-07
        • 1970-01-01
        • 1970-01-01
        • 2022-11-17
        • 1970-01-01
        • 2022-11-15
        • 2020-04-05
        • 2022-12-05
        • 2021-04-14
        相关资源
        最近更新 更多