代码之家  ›  专栏  ›  技术社区  ›  vestland

如何将Jupyter笔记本连接到Spyder内核?

  •  0
  • vestland  · 技术社区  · 7 年前

    相关帖子的答案 How to connect to an existing Jupyter Notebook kernel and inspect variables using the Variable explorer? 似乎只是 不可能 . 但是,如果我们尝试将Jupyter笔记本连接到spyder内核呢?那么有没有可能把内核提供给Jupyter笔记本,Spyder 和 Spyder的变量浏览器?

    文章 Connecting Spyder IDE to a remote IPython kernel 听起来有点可能:

    在Jupyter笔记本上做数据科学很有趣,但有时你需要 使用方便的变量浏览器插入变量的能力 在斯皮德。

    将Spyder连接到远程内核与 笔记本。我会带你走完整个过程。

    但是我不能复制这个例子,我有点担心我还没有完全理解作者对整篇文章的意思。


    这就是我尝试过的:


    一。 conda install spyder-kernels 工作正常。

    2。 也一样 python -m spyder_kernels.console  :

    enter image description here

    但其他的我有问题,这篇文章没有提到将Jupyter笔记本连接到 --existing kernel-19909.json . 我对这个角色也有意见 python -m spyder_kernels.console — matplotlib=’inline’ — ip=x.x.x.x -f=./remotemachine.json .

    有什么建议可以让我更进一步吗?

    系统信息:

    The version of the notebook server is: 5.6.0
    CPython 3.7.0
    IPython 6.5.0
    compiler   : MSC v.1912 64 bit (AMD64)
    system     : Windows
    release    : 7
    machine    : AMD64
    CPU cores  : 8
    interpreter: 64bit
    
    0 回复  |  直到 6 年前
        1
  •  1
  •   Arn    6 年前

    据我所知,您希望将IPython内核连接到本地计算机上的Spyder。你提到的文章描述了远程连接的这个过程,我相信这是让你困惑的部分。首先,确保您更新了 Spyder 到3.3.3版或以前的更新版本 a bug that prevented users from seeing their variables in the explorer . 以下是继续连接的步骤:

    1. 跑步 python -m spyder_kernels.console 并注意控制台输出中出现的JSON文件的名称: To connect another client to this kernel, use: --existing kernel-pid.json .
    2. 正常开放 斯皮德 .
    3. 点击 Consoles 在菜单栏中选择 Connect to an existing kernel 从下拉菜单中。
    4. 在打开的窗口中,输入前面提到的 内核-pid.json文件 在 Connection file 提示并单击 OK .

    完成这些步骤后,将出现一个新的控制台窗口,其中包含加载的内核。你现在可以把它和 Variable explorer .