Jupyter notebook not running code. Stuck on In [*]

2020-05-18 05:08发布

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 [*]".

See problem visually here

27条回答
走好不送
2楼-- · 2020-05-18 06:02

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.

查看更多
【Aperson】
3楼-- · 2020-05-18 06:02

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!

查看更多
劳资没心,怎么记你
4楼-- · 2020-05-18 06:02

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

查看更多
登录 后发表回答