Jupyter won't execute code

2,769 views
Skip to first unread message

u142...@tuks.co.za

unread,
Feb 2, 2017, 2:56:11 AM2/2/17
to Project Jupyter
Good Day

I am having problems with Jupyter. When I try to run my code on Jupyter, nothing happens. I think that the Kernel is not responding. If I click on "restart and run all", under the Kernel tab, a warning message appears to tell me that the Kernel has died. If I then click on "try restarting now" on the warning message, the message goes away, but the code still doesn't run.

However, the code does eventually run if I just leave it, but it takes about an hour before it does so.

The problems that I've typed in are easy one-liners, such as "print (2 + 2)", or import "numpy as np", but the lines don't get executed.


I am running Python 3.5 on the notebook, that is opened using Anaconda Navigator. Furthermore, my operating system is Windows 10.


I have tried uninstalling and re-installing Anaconda (both the Python 3 and Python 2 versions) and turning off my anti-virus, but nothing seems to solve the problem.

Does anyone have an idea why this is happening and how it can be fixed?


I have posted my question on stack overflow, but I have not been able to get an answer that works. The following is a link to my question on stack:

http://stackoverflow.com/questions/41972925/jupyter-notebook-timeout-waiting-for-kernel-info-reply


Any help will be much appreciated!


Regards

Johan

Thomas Kluyver

unread,
Feb 2, 2017, 9:59:10 AM2/2/17
to Project Jupyter
On 2 February 2017 at 07:56, <u142...@tuks.co.za> wrote:
However, the code does eventually run if I just leave it, but it takes about an hour before it does so.

That's the weirdest bit about this. I don't think anyone's reported this before - though maybe no-one else has been patient enough to wait that long.

A few things to try:
- Does the same thing happen if you go to try.jupyter.org and interact with a notebook there?
- Can you test on your local system with another browser, e.g. Chrome?
- Try with the Qt console and with IPython in a command prompt.




u142...@tuks.co.za

unread,
Feb 3, 2017, 4:41:05 AM2/3/17
to Project Jupyter
My problem was solved by uninstalling anaconda, after which I downloaded and installed the latest anaconda version.

I believe that my anti-virus caused the problem with the initial installation of the older Anaconda version, by blocking some of the installation and/or configuration settings. My conclusion is based on the fact that a whole lot of warning messages from Kaspersky kept popping up, asking whether to allow or to block the paths that the application wants to take to open up and run.

Choosing the "allow" button each time lead to Jupyter working fine.
Reply all
Reply to author
Forward
0 new messages