Using IPython console along side IPython notebook

試著忘記壹切 提交于 2019-12-02 16:16:45
Matt

Just do %qtconsole in one cell, and it will start a qtconsole attached to the same kernel. Of course your kernel need to be local.

you can of course use the long method :

In [1]: %connect_info
{
  "stdin_port": 50845, 
  "ip": "127.0.0.1", 
  "control_port": 50846, 
  "hb_port": 50847, 
  "signature_scheme": "hmac-sha256", 
  "key": "c68e7f64-f764-4417-ba3c-613a5bf99095", 
  "shell_port": 50843, 
  "transport": "tcp", 
  "iopub_port": 50844
}

Paste the above JSON into a file, and connect with:
    $> ipython <app> --existing <file>
or, if you are local, you can connect with just:
    $> ipython <app> --existing kernel-45781.json 
or even just:
    $> ipython <app> --existing 
if this is the most recent IPython session you have started.

then

 ipython qtconsole --existing kernel-45781.json
Ólavur

When you start the ipython notebook in the terminal, it will output something like this:

 2015-03-26 13:05:52.772 [NotebookApp] Kernel started: 4604c4c3-523b-4373-bfdd-222eb1260156

Then start the ipython console like this:

ipython console --existing 4604c4c3

I find this easier than the other solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!