I installed jupyter in python2.7 virtualenv
when I create new notebook, it can't execute any code in cell.
as showed follow:

Anyone could help me to figure out this problem?
there seem to be a connection issues between server and kernel.
From the screenshot, I'll guess you are on windows. Do you have any firewall/antivirus software ? If so can you try disabling it ?
(more info, like wether you install with conda, or pip might be helpful)
I already disabled the firewall,

Does the same happen in any browser?
It still doesn't work....
Have you tried in more than one browser? Also, try switching the address between localhost and 127.0.0.1 - some security software we've found blocks one of those but not the other.
Can you use IPython in the command prompt? If you run python -m ipykernel, do you get any errors?
I tried chrome, firefox and safari, and all don't work.
I using the public address instead localhost/127.0.0.1.
capture the terminal screen that i run "python -m ipykernel"

I'm not sure how you got it installed without that, but you should probably install ipykernel from pip or conda (whichever you used to install the rest of the stuff).
i type: #jupyter kernelspec list
Available kernels:
python2 /home/opennsa/dev/notebook/venv27/lib/python2.7/site-packages/ipykernel/resource
Does it show that I already install ipykernel?
Yes, I guess so. It looks like when you tried python -m ipykernel, it wasn't using the Python installed inside the virtualenv (the path starts /usr/local instead of pointing to your virtualenv). Make sure the virtualenv is active, and then try that command.
I fixed the virtualenv python path, then run python -m ipykernel as showed in below:

run jupyter notebook, the problem is still exist.....
@gracehllee Are you using a VM, like VirtualBox or VMWare?
yes, i am using virtualbox
Does jupyter console work, or does that also have problems?
jupyter console works.....

OK, I'm baffled. It looks like the kernel is not starting properly for some reason (Timeout waiting for kernel_info reply...), but you can use jupyter console, so it must be able to start a kernel and communicate with it.
Does the Windows VM have Sophos or any other kind of web security system installed? Those systems have produce symptoms like this before.
In your virtual machine, what happens if you run the notebook server: jupyter notebook ––ip=0.0.0.0
Then, view the notebook in the host’s browser: http://localhost:8888
I found when I run cell again.
It shows Dead kernel : The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.
In jupyter consol also show the "execption restarting kernel"
@gracehllee If possible, please add screen shots and terminal input/output since that will help us troubleshoot a bit easier. It sounds like you have the notebook running and can see the user interface. If that is correct, please restart the notebook with the following flag in addition to any other options that you have set jupyter notebook --debug. Will you send a screenshot of the About screen in the Help menu (looks like this:

Please also send a list of the terminal debug output which look similar to this (you can use ``` before and after the text to create a nice display in Github):
~p/jupyter-world/notebook$ jupyter notebook --debug
[D 03:38:21.557 NotebookApp] Config changed:
[D 03:38:21.557 NotebookApp] {'NotebookApp': {'log_level': 10}}
[D 03:38:21.558 NotebookApp] Searching ['/Users/carol/Projects/jupyter-world/notebook', '/Users/carol/.jupyter', '/Users/carol/.virtualenvs/mypy3/bin/../etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 03:38:21.558 NotebookApp] Looking for jupyter_config in /etc/jupyter
[D 03:38:21.558 NotebookApp] Looking for jupyter_config in /usr/local/etc/jupyter
[D 03:38:21.558 NotebookApp] Looking for jupyter_config in /Users/carol/.virtualenvs/mypy3/bin/../etc/jupyter
[D 03:38:21.558 NotebookApp] Looking for jupyter_config in /Users/carol/.jupyter
[D 03:38:21.558 NotebookApp] Looking for jupyter_config in /Users/carol/Projects/jupyter-world/notebook
[D 03:38:21.559 NotebookApp] Looking for jupyter_notebook_config in /etc/jupyter
[D 03:38:21.559 NotebookApp] Looking for jupyter_notebook_config in /usr/local/etc/jupyter
[D 03:38:21.559 NotebookApp] Looking for jupyter_notebook_config in /Users/carol/.virtualenvs/mypy3/bin/../etc/jupyter
[D 03:38:21.559 NotebookApp] Looking for jupyter_notebook_config in /Users/carol/.jupyter
[D 03:38:21.560 NotebookApp] Loaded config file: /Users/carol/.jupyter/jupyter_notebook_config.py
[D 03:38:21.560 NotebookApp] Config changed:
[D 03:38:21.560 NotebookApp] {'JupyterApp': {'config_file': '/Users/carol/.jupyter/jupyter_notebook_config.py'}, 'NotebookApp': {'log_level': 10}}
[D 03:38:21.561 NotebookApp] Config changed:
[D 03:38:21.561 NotebookApp] {'JupyterApp': {'config_file': '/Users/carol/.jupyter/jupyter_notebook_config.py'}, 'NotebookApp': {'log_level': 10}}
[D 03:38:21.561 NotebookApp] Looking for jupyter_notebook_config in /Users/carol/Projects/jupyter-world/notebook
[D 03:38:21.562 NotebookApp] Config changed:
[D 03:38:21.562 NotebookApp] {'JupyterApp': {'config_file': '/Users/carol/.jupyter/jupyter_notebook_config.py'}, 'NotebookApp': {'log_level': 10}}
[I 03:38:21.747 NotebookApp] Serving notebooks from local directory: /Users/carol/Projects/jupyter-world/notebook
[I 03:38:21.748 NotebookApp] 0 active kernels
[I 03:38:21.748 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 03:38:21.748 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[D 03:38:22.037 NotebookApp] Using contents: services/contents
[D 03:38:22.069 NotebookApp] 200 GET /tree (::1) 34.13ms
[D 03:38:22.140 NotebookApp] 304 GET /custom/custom.css (::1) 5.54ms
[D 03:38:22.311 NotebookApp] 200 GET /static/services/contents.js?v=20160226033821 (::1) 0.82ms
[D 03:38:22.315 NotebookApp] 200 GET /custom/custom.js?v=20160226033821 (::1) 0.70ms
[D 03:38:22.343 NotebookApp] 200 GET /api/config/tree?_=1456429102213 (::1) 0.82ms
[D 03:38:22.344 NotebookApp] 200 GET /api/config/common?_=1456429102214 (::1) 0.59ms
[D 03:38:22.349 NotebookApp] 200 GET /api/terminals?_=1456429102215 (::1) 0.66ms
[D 03:38:22.353 NotebookApp] Native kernel (python3) available from /Users/carol/.virtualenvs/mypy3/lib/python3.5/site-packages/ipykernel/resources
[D 03:38:22.353 NotebookApp] Native kernel (python3) available from /Users/carol/.virtualenvs/mypy3/lib/python3.5/site-packages/ipykernel/resources
[D 03:38:22.355 NotebookApp] 200 GET /api/kernelspecs (::1) 3.94ms
[D 03:38:22.356 NotebookApp] 200 GET /api/terminals?_=1456429102217 (::1) 0.45ms
[D 03:38:22.357 NotebookApp] 200 GET /api/sessions?_=1456429102216 (::1) 1.01ms
[D 03:38:22.422 NotebookApp] 200 GET /api/contents?type=directory&_=1456429102218 (::1) 7.78ms
^C[I 03:38:57.869 NotebookApp] interrupted
Serving notebooks from local directory: /Users/carol/Projects/jupyter-world/notebook
0 active kernels
The Jupyter Notebook is running at: http://localhost:8888/
Shutdown this notebook server (y/[n])? ^C[C 03:38:59.532 NotebookApp] received signal 2, stopping
[I 03:38:59.533 NotebookApp] Shutting down kernels
Thanks!
Any solution here ? I happend to be troubled with it too
I'm facing the same problem...any solutions yet?
@wqw547243068 @mayankdixit417 If you can provide additional detail to reproduce your error, that would be very helpful. We can help you determine if there is a configuration issue or a regression. Thanks.
cc @gnestor
hi everyone i got the same problem here....i'm using VM and i can't display on ipython or python i always get the error "QXcbconnrction:could not connect to display"
thanks
The error about QXcbconnection usually means matplotlib is trying to use its Qt backend in a headless environment. You probably need to tell it to use another backend - https://matplotlib.org/tutorials/introductory/usage.html#what-is-a-backend
I'm not sure that this will help, but in one of the cells I had an input still running that I had to quit running for the rest of my code to execute farther down in the document. I'm running into the problem again and I was wondering if anyone knows anything about how to find which cells are running, or what code is running inside the environment? (I'm a little new to this)
@mctopherganesh I had the same issue, I solved it by chose close and halt in Jupiter file toolbar. after that, I closed the current browser and reopened the project. hope this helps
Same thing here. Tried all the things. I can start jupyter console. Turned of antivirus. All browsers. Kernel>Restart Kernel tells me it has reconnected to the kernel. But still no run.
I also just created a fresh conda install and still won't run. All browsers. Jupyter console runs. Not tried jupyter qtconsole because I have no X. This is on a digital ocean ubuntu 18.04 VM. The problem started recently--have been using the notebook for weeks.
All antivirus off. All firewalls off.
Also--can't start a terminal. However, can create and save a text file.
Is any of this useful?
Is the "Stale connection" information useful?
(jupyter) balter@conda-test:~$ jupyter notebook --no-browser
[I 04:24:52.473 NotebookApp] Serving notebooks from local directory: /home/balter
[I 04:24:52.473 NotebookApp] The Jupyter Notebook is running at:
[I 04:24:52.473 NotebookApp] http://localhost:8888/?token=...
[I 04:24:52.473 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 04:25:05.753 NotebookApp] 404 GET /lab (127.0.0.1) 51.92ms referer=None
[I 04:25:11.624 NotebookApp] 302 GET / (127.0.0.1) 0.63ms
[I 04:25:16.389 NotebookApp] Creating new notebook in
[I 04:25:17.152 NotebookApp] Kernel started: a125cb09-f9c8-4fb0-911a-38b086ed0f65
[I 04:25:17.713 NotebookApp] Adapting to protocol v5.1 for kernel a125cb09-f9c8-4fb0-911a-38b086ed0f65
[W 04:25:17.714 NotebookApp] 400 GET /api/kernels/a125cb09-f9c8-4fb0-911a-38b086ed0f65/channels?session_id=959093a27cf74a9983b307b25a394f77 (127.0.0.1) 464.53ms referer=None
[W 04:25:18.813 NotebookApp] Replacing stale connection: a125cb09-f9c8-4fb0-911a-38b086ed0f65:959093a27cf74a9983b307b25a394f77
Possibly same issue as here
i m facing the same problem here.. please help
facing same issue. it works fine for me out of the virtual env.
Just got hit by this too. It looks like issue with tornado package as mentioned #4439. Not sure if that's entirely related though.
Regardless, I managed to get it working by downgrading tornado
python3 -m pip install notebook 'tornado<6'
Not sure if that helps but it's worth a try.
@shri3k it helps. thank you.
i tried
pip uninstall tornado
pip install tornado==5.1.1
There is an updated version of the notebook version 5.7.5 which supports tornado 6.x.
https://jupyter-notebook.readthedocs.io/en/stable/changelog.html#release-5-7-5
@shri3k it helps. thank you.
i tried
pip uninstall tornado
pip install tornado==5.1.1
Thank you, this worked for me. Had to downgrade from 6.0.1
@shri3k thanks for the infor, you saved me from throwing away my lappy !!!!. The tornado version was the issue due to which my cells were feeling dead all the time
Most helpful comment
@shri3k it helps. thank you.
i tried
pip uninstall tornado
pip install tornado==5.1.1