16

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Joran Beasley
  • 110,522
  • 12
  • 160
  • 179
  • Just curious, what happens when you hit shift+Enter? THat should also submit the cell. . . – reptilicus Oct 23 '12 at 18:11
  • same result as clicking the run cell icon (I just wanted to show the action... since it would be hard for viewers to know I hit shift enter) – Joran Beasley Oct 23 '12 at 18:25
  • Maybe the kernel's TCP connections back to the notebook server are being blocked by some kind of firewall. See [this thread](http://comments.gmane.org/gmane.comp.python.ipython.user/9032). – Eryk Sun Oct 23 '12 at 19:24
  • Yeah I saw that ... problem persisted even if i completely shutoff my local firewall ... :( thanks none the less though – Joran Beasley Oct 23 '12 at 20:22

3 Answers3

23

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 :)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Joran Beasley
  • 110,522
  • 12
  • 160
  • 179
  • 3
    IPython developer here, thanks for this answer, Jordan, it's exactly what was needed to get a Windows user's notebook working (and I particularly appreciate the step-by-step instructions, since many of us have very minimal windows experience) – Paul Ivanov Jun 24 '13 at 14:11
  • 3
    just want to point out, that this worked for me too! It was Sophos Antivirus blocking stuff. Note, that I didn't add "localhost" to the "Authorized websites", since the dialog wouldn't accept that as a domain name, so, just "127.0.0.1"! – Daren Thomas Jun 28 '13 at 12:08
17

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
Carsten
  • 17,991
  • 4
  • 48
  • 53
  • 1
    This answer is used in the three-hour IPython tutorial *[Fernando Perez: IPython in depth: high productivity interactive and parallel python - PyCon 2014](https://www.youtube.com/watch?v=XFw1JVXKJss)*, at 08 min 35 secs. – Peter Mortensen Jun 25 '16 at 18:36
6

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). Details of how to do this can be found on the IPython website.

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.

Benjamin Hodgson
  • 42,952
  • 15
  • 108
  • 157
  • thanks for the link ... Im at home and ipython notebook works fine on this computer i just cant get teh damn thing on my work 'puter I'll try tomorrow and see if this helps thanks :) – Joran Beasley Oct 24 '12 at 03:18
  • Mine was the same; my macbook works fine, but I had to do the above to get the windows box at work to respond – Benjamin Hodgson Oct 24 '12 at 17:19
  • Im having no luck with this ... can you maybe give me your notebook_config file ... maybe Im not setting the right values ... – Joran Beasley Oct 24 '12 at 19:00
  • 3
    turns out it was sophos antivirus ... killing the service allows me to get output .... I wonder if there is a way to tell sophos to allow it ... – Joran Beasley Oct 25 '12 at 18:35