My code was running fine before I did not change anything and I ran it again. Now it doesn't return anything not even an error. It is just stuck on "In [*]".
问题:
回答1:
This means that Jupyter is still running the kernel. It is possible that you are running an infinite loop within the kernel and that is why it can't complete the execution.
Try manually stopping the kernel by pressing the stop button at the top. If that doesn't work, interrupt it and restart it by going to the "Kernel" menu. This should disconnect it.
Otherwise, I would recommend closing and reopening the notebook. The problem may also be with your code.
回答2:
I have installed jupyter with command pip3 install jupyter
and have the same problem. when instead I used the command pip3 install jupyter ipython
the problem was fixed.
回答3:
updating ipykernel did it for me. it seems arch linux's ipykernel package had been outdated for some time
just do pip install --upgrade ipykernel
reference here: github solution
回答4:
pip install ipykernel --upgrade
https://github.com/jupyter/notebook/issues/1133
回答5:
This is mean your program is still running in background, you need to click shutdown (Shown in attached Image).
*** Shutdown the Running cell and again run your program.
回答6:
What I did was to quit the Notebook, and I started all over again. That is the proper solution. Restarting the Kernel really did not really help. But quitting did so try quitting and start again
回答7:
The answers that state that your kernel is still executing the code in the cell are correct. You can see that by the small circle in the top right. If it is filled with a black/grey color, then it means it is still running.
I just want to add that I experienced a problem in JupyterHub where the code in the cell would just not execute. I stopped and restarted the kernel, shutdown and reloaded the notebook, but it still did not run.
What worked for me was literally copy pasting the same code to a new cell and deleting the old one. It then ran from the new cell.
回答8:
Usually, stopping and restarting that particular cell fixes this issue.
回答9:
I had the same problem, and the little star means that the kernel is still working. So the program is trapped in an endless while loop. So you only have to the rewrite the code
回答10:
I had the same issue. I found that ipython must be running for jupyter notebook to execute. Do the following:
- Go to the folder where you have your ipython notebook(.ipynb)
- Press shift and right click on the empty space then select "open command window here". This will open a command prompt window.
- Type
ipython
. This will start ipython. - Open another command prompt window and open jupyter notebook.
- Open your file again and go to cell>>>run cell.
This should work. It worked for me. Cheers!
回答11:
Based on you kernel status (upper right beside "Python 3", the one that is a circle). It seems that it is still busy. It might be trapped in an endless loop or maybe you've run/display something that is not closed.
回答12:
This is because when we run a loop until it's termination the Kernel is in busy state and so IN [*]
is shown up. Since Kernel is busy and if we just leave that cell to execute completely and switch to another cell to run, the corresponding cell will get busy and so again for that cell IN[*]
is shown.
In that case you just need to restart your jupyter notebook and all is fine then.
But be sure that your loop will terminate this time or else again this error will turn up.
回答13:
I had the same problem and not any of the above mentioned solutions worked.
Until I updated conda packages:
conda update conda
conda update anaconda
and ... Voila! It all works!
回答14:
From my experience, it usually means one of the prior cells is keeping the kernel busy. When you hit run on the intended cell and [*]
appears, from there, try to scroll up to the prior cell which is also advertising a [*]
. Then goto kernel
->interrupt
, and lastly, try running the cell again.
回答15:
I have uninstalled jupyter, notebook and ipython, and installed jupyterlab. It is working for now (with just a few libraries installed and Python 3.6.8.
Something to discard: Uninstalling Python 3.7 completely with his libraries and reverting to 3.6 doesn't fix it, although it improves it, it works intermittently now (but once sth doesn't work properly, things start to get worse and worse, so I did the above).
回答16:
If you have ad block installed in your browser, just switch it off and then stop the kernel and start again. now the code will execute
回答17:
The * shows up when kernel is running some other program, it might have stuck in some kind of infinite loop. Pressing stop button at the top to stop the kernel, It might fix the problem...
回答18:
Sometimes the extensions also create a problem. I was using a dark mode extension(Night Eye) in Microsoft edge. So kernel was busy. When I uninstalled it. It working fine.
回答19:
I had the same issue now:
Solved it by:
Just reloading the local weblink in which the Python is running
http://localhost:8888/notebooks/sec%201/Untitled.ipynb
回答20:
It's just the incorrect lines of code you were trying to execute..
- You need to turn off your antivirus (if have).
- Restart Jupyter Notebook.
- Copy your code then delete the cell you were working on.
- Rewrite code and make sure you are not doing any mistakes.
- Find the missed/wrong lines of code specially increment operators and correct them.
hope it help..
回答21:
Check the output on the server environment from which jupyter notebook
was launched if you can. You'll probably find error messages and print()
results.
回答22:
I fixed this issue
just only type this command: jupyter notebook --no-browser
It will show you the path then copy and paste on Jupyter Notebook browser
The code will be executed in IPython Notebook Python 3
回答23:
I have the same issue and I did this:
I went to windows option (the icon), then I chose the option Anaconda Prompt
then a small windows show up with the prompt like this: c:\user\computer name>
then I type this:
c:\user\computer name>jupyter notebook
then enter and that's it.
I hope that helps
回答24:
I had the same problem.
In Jupyter main menu:
1) Kernel -> Shutdown 2) Kernel -> Restart
回答25:
usually, it is solved with restarting the Kernel on jupyter notebook.
回答26:
pip install prompt -toolkit~2.0.9 pip install --upgrade ipython conda update jupyter_core jupyter_client
回答27:
I have fix for this issue,
example if you are assigning some values to DataFrame
[*] symbol has shown this because of the script running
to see the outout of the script have to mention df like this, output