Cannot execute code in some of Jupyiter ipython notebook cells
Asked Answered
D

4

7

Any cells in Jupyter which have In [*] in front of them are not executing in Jupyter notebook. See image below:

enter image description here

I even restarted the kernel, without any improvement of the situation. Previous cells run without trouble. Every cell I added recently has the problem.

Doorsill answered 3/3, 2016 at 12:26 Comment(7)
Why do you have lines that start that way?Morgan
@zondo, please see the added image. I didn't add those. Those were in front of each cell. I guess ln indicates line numberDoorsill
What is the console output of the Jupyter kernel? Can you run normal ipython?Sum
there is no such notable output in the console.Doorsill
Can you run ipython in a terminal? What about jupyter console? Is there anything the cells that have problems have in common - e.g. do they all start with a blank line like the picture in the question? Does the browser's JS console show any errors when this happens?Eggleston
Thanks guys.. I did remove a top blank line from one of the cells. It runs after many restarts of the kernel. Oh God :)Doorsill
@Doorsill Did you resolve this problem? I'm facing it right now...Feminize
E
0

I recommend you the following steps:

  1. Close ipython notebook, and then reopen the file.
  2. If 1 does not work, then restart the kernel and reopen the file.
  3. If 2 does not work, then try whether things work fine on console. Type ipython and check whether your code statements work.
  4. If 3 does not work, try reinstalling the scientific python distribution if you are using Anaconda or Enthought.
Encaenia answered 9/3, 2016 at 8:50 Comment(0)
H
0

I have encountered same problem on my windows machine.Try Jupyter with Anaconda on Windows will not run cells. Probably your antivirus program or your iis is blocking default 8888 port.

Handicraftsman answered 20/5, 2016 at 10:39 Comment(0)
M
0

Downgrading tornado to 4.5.3 fixed my problem. with

pip - sudo python3.6 -m pip install tornado==4.5.3
conda - conda install tornado==4.5.3

use this for this bugs

Monumental answered 6/12, 2019 at 9:38 Comment(0)
F
0

You probably have a lot of notebooks(tabs) open with running kernels in them. You can check this by clicking on this icon 1 on the left. There you see all the running kernels in all your open notebooks and shut them down.2 This should solve your problem.

Feebleminded answered 21/12, 2021 at 4:46 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Intertwine

© 2022 - 2024 — McMap. All rights reserved.