notebook: Unable to start IPython kernel with 4.0

Hi, I’ve encountered a nasty issue after upgrading to jupyter.

Whenever I try to open a notebook and get working, it hangs. Eventually I get a popup notification that says

Connection failed
A connection to the notebook server could not be established. The notebook will continue trying to reconnect, but until it does, you will NOT be able to run code. Check your network connection or notebook server configuration."

In the terminal, I see:

[mlw-mbair ~]$ jupyter notebook --port 9999
[I 18:27:12.832 NotebookApp] Serving notebooks from local directory: /Users/mwaskom
[I 18:27:12.832 NotebookApp] 0 active kernels
[I 18:27:12.832 NotebookApp] The IPython Notebook is running at: http://localhost:9999/
[I 18:27:12.832 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 18:27:19.556 NotebookApp] Creating new notebook in /Desktop
[I 18:27:20.525 NotebookApp] Kernel started: 6834a152-cce8-47b9-888f-2166b86dfd2d
[I 18:27:23.524 NotebookApp] KernelRestarter: restarting kernel (1/5)
[I 18:27:26.532 NotebookApp] KernelRestarter: restarting kernel (2/5)
[I 18:27:29.539 NotebookApp] KernelRestarter: restarting kernel (3/5)
[W 18:27:30.611 NotebookApp] Timeout waiting for kernel_info reply from 6834a152-cce8-47b9-888f-2166b86dfd2d
[I 18:27:32.547 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 6834a152-cce8-47b9-888f-2166b86dfd2d restarted
Abort trap: 6

FWIW, I use anaconda but initially installed jupyter using pip when it was released, because I was eager to play with it. So perhaps that is the issue. However, in my attempts to remedy this, I have gone through multiple iterations of uninstalling with pip, uninstalling with conda, manually deleting everything that looks related in site-packages and bin/ and yet the problem remains.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 40 (12 by maintainers)

Most upvoted comments

I just got the problem with uBlock. You have to disable it from the extensions menu of chrome, and it should work again.

Thanks for the quick reply. I have uBlock, but disabling didn’t seem to fix it. Any other suggestions?

Edit: Just tried it in incognito Chrome and another browser and it works fine. I guess I needed to just not have uBlock active at all? Either way, seems like it’s fixed.

Several people just reported a similar issue with a recent update to uBlock on Chrome. If you have that combination, try disabling it. Apparently uBlock 1.7.2 will fix it.

I just tried the following

[mlw-mbair ~]$ conda create -n ipython_test ipython-notebook=3.2
[mlw-mbair ~]$ . activate ipython_test
(ipython_test)[mlw-mbair ~]$ pip install -U jsonschema
(ipython_test)[mlw-mbair ~]$ pip install jupyter

After doing this, I was able to start the notebook with no problems. So I don’t think it is quite so simple as a problem caused by pip installing jupyter over ipython that was installed by anaconda.

Aha, now we are on to something. Conda’s libzmq is 4.0.5, but your pyzmq is picking up 4.1.2, perhaps from homebrew (in /usr/local/lib). Try this:

conda remove pyzmq
pip install pyzmq