从Linux连接到Windows IPython内核 [英] Connecting to a Windows IPython kernel from Linux

查看:150
本文介绍了从Linux连接到Windows IPython内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  • 我有一台Windows机器,我启动了一个IPython内核(做一些其他机器上无法实现的东西)。

  • 我有一台Linux机器来自我希望连接到Windows机器上运行的IPython内核。

  • 我可以从Linux机器SSH到Windows机器(使用此解决方案:https://superuser.com/a/172299

  • I have a Windows machine where I start an IPython kernel (to do some stuff not possible on another machine).
  • I have a Linux machine from which I would like to connect to the IPython kernel running on the Windows machine.
  • I can SSH from the Linux machine to the Windows machine (using this solution: https://superuser.com/a/172299).

我试过以下内容: https ://github.com/ipython/ipython/wiki/Cookbook:-Connecting到一个远程-内核经由-SSH 。自动和手动解决方案都提供以下内容:

I have tried following: https://github.com/ipython/ipython/wiki/Cookbook:-Connecting-to-a-remote-kernel-via-ssh. Both the automatic and the manual solution gives the following:

错误:内核未响应

使用同样的解决方案,我可以从我的Linux机器连接到在Linux服务器上运行的IPython内核。任何使Linux与Windows一起工作的解决方案?

Using the same solution, I can connect from my Linux machine to an IPython kernel running on a Linux server. Any solution to get this to work with Linux to Windows?

推荐答案

我在 https://github.com/ipython/ipython/wiki/ Cookbook%3a-connected-to-remote-kernel-via-ssh 再一次起作用。详细信息:

I tried the manual way on https://github.com/ipython/ipython/wiki/Cookbook%3a-Connecting-to-a-remote-kernel-via-ssh once again and it worked. In detail:

windows-machine$ ipython kernel -f kernel-1234.json







linux-machine$ scp windows-machine:path/to/kernel-1234.json .
linux-machine$ cat kernel-1234.json
{
  "stdin_port": 55534, 
  "ip": "127.0.0.1", 
  "control_port": 58391, 
  "hb_port": 60540, 
  "signature_scheme": "hmac-sha256", 
  "key": "fa461cf7-f078-4c22-909f-cfa7d2a30596", 
  "shell_port": 60159, 
  "transport": "tcp", 
  "iopub_port": 59207
}
linux-machine$ ssh -f -N -L 55534:127.0.0.1:55534
linux-machine$ ssh -f -N -L 58391:127.0.0.1:58391
linux-machine$ ssh -f -N -L 60540:127.0.0.1:60540
linux-machine$ ssh -f -N -L 60159:127.0.0.1:60159
linux-machine$ ssh -f -N -L 59207:127.0.0.1:59207
linux-machine$ ipython console --existing kernel-1234.json

这篇关于从Linux连接到Windows IPython内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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