Ipython: Jupyter Notebook is not showing the output of any code executed on the cell

Created on 1 Mar 2018  Â·  70Comments  Â·  Source: ipython/ipython

Hello,
I am new to python. When I use Jupyter Notebook the code inside the cells won't execute and I get these empty brackets ([ ]).
jn

Most helpful comment

Try restarting the kernel in kernel option

All 70 comments

  • Do you have any security software installed? We've seen similar problems with some internet security software blocking our connection.
  • Does it work if you try in another browser (like Firefox)?

no security software.
It was working on chrome 1 week before

Any ideas what changed? Did you install any extensions or update anything? It's still worth trying with another browser.

Let me try with firefox

it launches with chrome default.
Is it possible to change browser

Yes. For testing temporarily, right click the Jupyter logo in Chrome and copy the link, then paste it into Firefox.

If you want to override the default, configure NotebookApp.browser (see config docs).

Same issue in firefox.

How are you trying to execute the cells?

Using Shift + Enter.
I installed anaconda on another system. Now it is working.

On Fri, Mar 2, 2018 at 11:51 PM, Thomas Kluyver notifications@github.com
wrote:

How are you trying to execute the cells?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ipython/ipython/issues/11027#issuecomment-370007040,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AjPaqbV3K6AxlRHni7vEaB9h4iThvevrks5taY2qgaJpZM4SYFo9
.

Try restarting the kernel in kernel option

Restarting the kernel solves it temporarily. What is the cause and the permanent fix?
It was working fine on my box two days ago, and I have not changed anything.

it can be caused by many reasons like:

  1. your antivirus is blocking it.
  2. your code it taking too long to execute(due to hardware limitations).
  3. something is wrong with your python distribution package. (try reinstalling it)

Like I said, it was working as recently as two days ago. Code is just a simple loop. There is no antivirus installed. I have not updated any package during this time.
Right now I'm restarting the kernel for every run, which is very annoying.

This problem is also happening for me in a simple for loop. Using chrome browser.

One reproducible way to force Jupyter to stop showing new output (and make the kernel hang) is to run "cat" in a cell with no arguments (on Google Chrome / Ubuntu 16.04). If there is a way to solve this problem (send a Ctrl-D to the kernel?), it might also solve the other looping problems.

yes it is also happening with me .. i thought it as antivirus problem but i think its not, because i had reinstalled it by disabling my antivirus .. but it is not working still ... don't know what to do ... i had also tried another browser option like Mozilla chrome Microsoft edge also with internet explorer .. but it still not working.... somebody plzz help...

Hi,
I have just installed juypeter and I have the same issue. I tried on both chrome and iexplorer. When I try to restart the kernel, it gets stuck and this message shows forever "kernel starting, please wait"

hi anyone has the answer? i have the same problem too

I have the same problem :(

Any answers here?

In my case, the below solution worked. (Downgrading tornado to 4.xx)

https://github.com/jupyter/notebook/issues/3202#issuecomment-357199274

@fgtom downgrading tornado didn't work for me :/

I occasionally run into this problem since a while... I already tried disabling Windows Defender and the Firewall and different browsers without success. I installed the Jupyter Notebook using conda. I also tried reinstalling it globally and in conda environments without success either. :( This is really annoying...

same thing happened to me ...but when I disabled my adaware antivirus ..it worked...!!!!

I am having problem of not compiling. It shows In[*] whenever i compile. I have tried all solutions above, disabling my defender, changing browser options, reinstalling python package , installing jupyter through pip install and anaconda but still problem stays. What can be the solution??

Disabling Adaware antivirus solved this problem for me.

Why is there no one assigned to this? This approaches being a dealbreaker for corporate people running jupyter behind mandated antivirus.

Perhaps said corporate people should contribute to understanding and fixing the problem?

@takluyver I already spent several hours trying to find the cause, both at work and at home, but found that I lack experience with the code base / the architecture / how components are supposed to communicate. I'm sure if someone more experienced with the project could provide some hints on where to look / what to try everyone would be more than willing to work on a solution.

Simply uninstall your adaware antivirus. It fixes the issue!

First of all, let's check the state of any cell is the "Code" not in "Markdown"

I had the same problem and not any of the above mentioned solutions worked.

Until I update conda packages:

 conda update conda
 conda update anaconda

and ... Voila! It all works now!

image
Same issue with not running - a weird asterisk appears within the brackets.

Maybe an error message might help in this case, like "For some reason I cannot connect to the kernel, could you please try disabling your antivirus, firewall and speed-limiting software? If it still doesn't work, please post an issue on github."

Also I seem to have found another cause for that problem - on my private PC the problem appears to have been caused by the software "NetLimiter". I use that to limit my PCs download speed when I'm on a slow shared internet connection.
I noticed that when I set a global speed limit (which seems to also include connections from/to localhost!) of <100kB/s, the kernel does start - but it can take several minutes! The notebook / kernel appear to transfer a lot of data after the connection is established. If the connection is slow, that can take ages.
I haven't run into this problem again since I disabled the speed limit in NetLimiter. yay.

My jupyter notebook book outputs in python. I added an R cell at the end. It doesn't output things like print and head in the R cell, but does output graphs

image

not related - the above function works if you read in the csv. It doesn't work if you use the dataframe that was saved to that csv from a cell above

Downgrading tornado to 5.1.1 fixed this issue for me.

It'll relate https://github.com/jupyter/notebook/issues/2664.

As @sonofagunn suggests, downgrading tornado may fix the problem.

Downgrading tornado to 5.1.1 fixed this issue for me.

Saved my life. Tornado recently upgraded to 6.0.1, which seems to cause the problem.

Downgrading tornado to 5.1.1 fixed this issue for me.

save my life . I have no anti-virus software installed and just try to reinstall jupyter notebook but encounter such an issue. use python -m pip install tornado==5.1.1

Yeap, it was an issue with tornado. Downgrading to 5.1.1 fixed the issue.

This problem is also happening for me in a simple for loop. Using chrome browser.

It happens to everyone, I usually just switch to sublime text for a few and then return the next day, if am lucky my jupyter works if am not lucky, i go back to subline

This bug comes due to multiple spaces in your system folder. In my case, I reinstalled the OS. Then, I installed Anaconda. It worked. :100:

I fixed this interrupting the kernel and restarting it again
Notice the * in the prompt [*] instead produce an output [some number]. That means that the kernel is busy, maybe due to some operation with a lot of computation

Screen Shot 2019-04-11 at 21 18 38

After that, you can execute shift + enter over the cells in order to produce the outputs again (also try to identify and avoid the heavy operation)

Jupyter notebook is a mess. Will not print anything. No errors, no messages.

frustrating

I happened the same with me after I installed jupyterthemes, I fixed by upgrading kernel using the following command: python -m pip install --upgrade ipykernel

This happened to me and I realized the issue was caused by a duplicate nbextensions directory this leads to duplicated .yaml files for the scratchpad extension.

I fixed by simply typing jupyter --paths into the console. Looking where my jupyter nbextensions were stored. I had nbextensions stored in both myname/anaconda3/etc/jupyter and in myname/.local/share/jupyter

I deleted the nbextension from myname/.local/share/jupyter and I kept the one in anaconda3 folder.

Problem solved!

As @Hazarmavi mentioned. fixed it by upgrading kernel using the following command: python -m pip install --upgrade ipykernel

I have the same problem. I tried downgrading tornado and upgrading ipykernel and confirmed that I do not have duplicated nbextensions, but my problem has not been solved yet. (This is pretty annoying and I cannot work on anything.)

In my environment, conda list | grep "tornado" gives
tornado 5.1.1 py36h1de35cc_0

and conda list | grep "ipykernel" returns
ipykernel 5.1.1 py36h39e3cac_0

Does any body have any other suggestions?

First time facing this issue, asking wtf of course :-), On Gentoo don't have this issue, but was using now WLS Ubuntu via virtualenv in W10 host. Well, I just did CTRL+C in terminal, which triggered Jupyter to be completely restarted (it won't shutdown) and now outputs magically appeared automatically.

I have the same problem.
1- Shouldn't the activation circle close to the Python be 'green' if the Python is working properly?
2- Moreover, what is that asterisks that appears after I run a line?

jupyter_problem

@Aref-cs

  1. That circle isn't green. An empty circle means the kernel of the notebook isn't doing anything, and a full circle means it's running code.
  2. The asterisks in the cells mean they are being executed, they change to the number when they finish executing the code.

I had the same issue. I just ran the prompt as administrator as I found a permission error displayed in Jupyter Notebook and disabled my firewall and it works fine.

try reinstalling python as well e.g in my case python 3.5.2 worked fine as I was having problems with python 3.8 and so after reinstalling jupyter notebook things seem to run perfectly.

I had the exact same issue. Downgrading to Tornado 5.1.1 fixed the issues
(Windows 7, Python 3.7.5, Spaces in the path name to the venv that Jupyter runs from)

I have the same problem.
1- Shouldn't the activation circle close to the Python be 'green' if the Python is working properly?
2- Moreover, what is that asterisks that appears after I run a line?

jupyter_problem

Restart kernel solved the same problem for me.

I found the missing output redirected to Jupyter Notebook console, after running django.setup(). Then, reset the stdout, solved. Don't know detail yet.

import os, sys
print 'django setup start.'
stdout = sys.stdout
import django
django.setup()
sys.stdout = stdout
print 'django setup done.'

I have found that I encounter this issue every time an unhandled exception bubbles up to the notebook. In those cases I have to restart the kernel every time—which is very frustrating.

I am having the same issue. It started happening yesterday after installing numba with
python3 -m pip install numba --user

I tried downgrading to tornado 5.1.1 but it does not fix the issue.
In any case, I run Jupyter Notebook 6.0.1 (Python Python 3.6.9), which should not have any problem with the latest version of tornado (6.0.3).

I am on Ubuntu 18.04, so no antivirus. It is not because of the running time of the cell either, it happens with basic '2+2' cells.

Any clue?

I am having the same issue as @woodrujm , where my Python output works fine, but my R output doesn't work properly. The graphs for R work, but the regular output prints to my console rather than the cell output area. I am trying everything here and will report back if I find anything that doesn't involve settling for reading off my console.

Hello,
I am new to python. When I use Jupyter Notebook the code inside the cells won't execute and I get these empty brackets ([ ]).
jn

Uninstalling antivirus worked for me

I had the same issue. Solution was found here:
https://github.com/jupyter/notebook/issues/4613#issuecomment-548992047

import sys
Fixed the issue

Hi guys!

I don't have a fix for this issue, since I stopped using my local system! I have a short-term (or maybe long-term) fix for this issue for those who just want to start coding instead of trouble shooting Jupyter and Python packages: use something like _Google Colab_!

I had an issue with Jupyter, then I switched to Anaconda and used JupyterLab, but both had the same issue of having problems with the server connections! I had removed and installed Jupyter, Anaconda and Python several times and changed settings too.

But to me, it was so much hassle! especially, since I was using Windows and once something goes wrong in windows, it continues to go wrong! :)) Also, I don't get it! Almost whenever I started using a new technique, application or technology, I had to dedicate the first week (or two) of my work to trouble shooting for the thing to just start working on my system! :) So, I switched to online alternatives such as the one CoCalc provides. But for now, I am using _Google Colab_ and it works just fine!

image
I don't know what this numbers mean, but without them I can't see any outbut.

I solved this problem by creating with new field, which was created with numbers.

i would like to add one observation:
when i run a loop goes into infinite execution, jupyter notebook stops showing output of executed code. restarting the kernel did resolve the issue.
I think this issue occurs in case of execution time out.

hello in my jupyter notebook class function is not working
Screenshot (11)..pls help me

had the same issue , fixed it by closing all tabs, reopening the files in JupyterLab v1.2.6, rerunning the cells one after the other. - watiting for the first one to finish before running the next cell.....I am now getting all the output just fine.

Had the same issue turns out i was downloading all dependencies in my local not inside the tensorflow VM (tensorflow_cpu / tensorflow_gpu). So make sure you are inside the VM

Closing as this issue is not in IPython itself and if still problematic and relevant should be opened on the right repository if this is an actual bug or code proposal. For general help use discourse. This will allow to keep the number of opened issue on the IPython repo under control and allow you to get faster response.

Hi

I could not solve this either but I am a beginner so I am not particular about IDEs at the moment. I just want to learn the important computing concepts quick and not waste my time troubleshooting this problem.
Solution: I switched to Visual Studio Code and it has not given me any problem.
Click here: https://code.visualstudio.com/ to download it.

Hope this helps!

Downgrade tornado, this worked for me.

pip install tornado==4.5.3

Was this page helpful?
0 / 5 - 0 ratings