简体   繁体   English

使用IPython Notebook获取输出

[英]Getting output with IPython Notebook

When I launch IPython Notebook I can navigate to it and enter code. 当我启动IPython Notebook时,我可以导航到它并输入代码。 However, nothing is ever echo'd back to the IPython Notebook interface. 但是,没有任何东西可以回到IPython Notebook界面。

I know the server is getting the queries (from --debug output ) and responding to them it's just never giving me output in my IPython Notebook window. 我知道服务器正在获取查询(来自--debug output )并响应它们,它只是从来没有在我的IPython Notebook窗口中输出。

I am running Python 2.6.6 and Windows 7 我正在运行Python 2.6.6和Windows 7

I am at a loss currently on how to get this notebook thing to work. 目前我对如何使这款笔记本电脑工作感到茫然。

Here is a screencast of me trying (unsuccessfully) to get output: 这是我尝试(失败)获取输出的截屏视频:

http://screencast.com/t/TwJ2ZmGnT http://screencast.com/t/TwJ2ZmGnT

Even if you don't know what's wrong, any pointers on how to further debug my problems :( 即使你不知道什么是错的,关于如何进一步调试我的问题的任何指针:(

So far I have run the test chatclient for tornado, https://github.com/facebook/tornado/tree/master/demos/websocket , successfully. 到目前为止,我已成功运行龙卷风测试chatclient, https://github.com/facebook/tornado/tree/master/demos/websocket

And also the test scripts for pyzmq, https://github.com/zeromq/pyzmq/blob/master/examples/poll/reqrep.py , ran successfully. 此外,pyzmq的测试脚本https://github.com/zeromq/pyzmq/blob/master/examples/poll/reqrep.py也成功运行。

The return output to the notebook was being blocked by Sophos Endpoint Security and Control. Sophos Endpoint Security and Control正在阻止笔记本电脑的返回输出。

Disabling "Sophos Web Intelligence Service" in services.msc worked, but it was not ideal since it turns off my web intelligence or whatever ... I don't really want to make myself more susceptible to bad stuff... 在services.msc中禁用“Sophos Web Intelligence Service”有效,但它不理想,因为它关闭了我的网络智能或其他......我真的不想让自己更容易受到坏事的影响......

So the solution is to: 所以解决方案是:

  1. Open your Sophos Endpoint Security and Control Panel from your tray or start menu. 从托盘或开始菜单打开Sophos Endpoint Security和控制面板。

  2. Select "Configure" -> "Anti-virus" -> "Authorization" from the menu at the top. 从顶部菜单中选择“配置” - >“防病毒” - >“授权”。

  3. Select the websites tab. 选择网站标签。

  4. Click the "Add" button and add 127.0.0.1 and localhost to the "Authorized websites" list. 单击“添加”按钮,将127.0.0.1和localhost添加到“授权网站”列表中。

  5. Restart the computer 重新启动计算机

  6. Output works now :) 输出现在工作:)

我和OP处于相同的状态,刚刚发现IPython笔记本在启动时工作(没有取消Sophos)

ipython notebook --ip=localhost

I had this problem. 我有这个问题。 I found two ways of fixing it, though your mileage may vary: 虽然您的里程可能会有所不同,但我找到了两种方法来修复它:

  1. I killed the software firewall process. 我杀了软件防火墙进程。

  2. I configured the notebook to accept HTTP connections from anywhere (with a password and a secure connection, obviously). 我将笔记本配置为从任何地方接受HTTP连接(显然,使用密码和安全连接)。 Details of how to do this can be found on the IPython website . 有关如何执行此操作的详细信息,请访问IPython网站

I don't know why the second one worked. 我不知道为什么第二个有效。 My best guess is that the combination of the firewall and a NAT made connections to localhost look, to the notebook, as though they were coming from elsewhere. 我最好的猜测是防火墙和NAT的组合使得与本地主机的连接看起来像笔记本,好像它们来自其他地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM