Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting output with IPython Notebook

When I launch IPython Notebook I can navigate to it and enter code. However, nothing is ever echo'd back to the IPython Notebook interface.

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.

I am running Python 2.6.6 and 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

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.

And also the test scripts for pyzmq, https://github.com/zeromq/pyzmq/blob/master/examples/poll/reqrep.py, ran successfully.

like image 489
Joran Beasley Avatar asked Oct 23 '12 17:10

Joran Beasley


People also ask

How do I get the output from a Jupyter notebook?

Jupyter Notebook can print the output of each cell just below the cell. When you have a lot of output you can reduce the amount of space it takes up by clicking on the left side panel of the output. This will turn the output into a scrolling window.

Why the output is not showing in Jupyter notebook?

It is your expection that needs to be adapted. The Jupyter Notebook only shows what the last statement of a cell evaluates to. If you define a function, this does not evaluate to anything that could be displayed. So you can't see anything in the upper cell.

How do I download only the output from a Jupyter notebook?

The Jupyter Notebook has an option to export the notebook to many formats. It can be accessed by clicking File -> Download as -> PDF via LaTeX (or PDF via HTML - not visible in the screenshot). This approach requires you to install some additional packages. For me, the option that exports with LaTeX is difficult.


2 Answers

The return output to the notebook was being blocked by 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...

So the solution is to:

  1. Open your Sophos Endpoint Security and Control Panel from your tray or start menu.

  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.

  5. Restart the computer

  6. Output works now :)

like image 94
Joran Beasley Avatar answered Sep 29 '22 05:09

Joran Beasley


I am in the same situation as the OP and just found out that the IPython notebook works (without disablying Sophos) when it is started with

ipython notebook --ip=localhost
like image 41
Carsten Avatar answered Sep 29 '22 05:09

Carsten