Jupyter Notebook Kernel busy all the time

15,538

I was also getting the same issue, I tried a lot of different stuff but nothing seemed to help me out. Ultimately, a Kernel Restart instead of Kernel Interrupt helped me out! The kernel restarted and I was able to run the kernels as usual.

I think this is just a workaround if someone finds the real solution please do let us know!

Share:
15,538

Related videos on Youtube

Dnyanesh Khedekar
Author by

Dnyanesh Khedekar

Updated on June 04, 2022

Comments

  • Dnyanesh Khedekar
    Dnyanesh Khedekar almost 2 years

    I have instaled anaconda and python works fine in Sypder , IPython etc . However I am not able to run python notebook.

    Kernel gets created , it also connects but it shows the dark circle busy symbol throughout . There is no problem with the firewall or antivirus . I have tried by disabling both .

    I am also not able to open python terminal from notebook there is some powershell error.

    Can anyone suggest something ?

    Edit 1 : Added the snapshot and the log

    Log Anaconda Prompt :

    (base) C:\Users\Project>jupyter notebook
    [I 13:11:26.561 NotebookApp] JupyterLab extension loaded from C:\Users\Project\A
    naconda3\lib\site-packages\jupyterlab
    [I 13:11:26.561 NotebookApp] JupyterLab application directory is C:\Users\Projec
    t\Anaconda3\share\jupyter\lab
    [I 13:11:26.569 NotebookApp] Serving notebooks from local directory: C:\Users\Pr
    oject
    [I 13:11:26.570 NotebookApp] The Jupyter Notebook is running at:
    [I 13:11:26.570 NotebookApp] http://localhost:8888/?token=28e7406ee648d631648f9b
    8c53e1f3027f5eb30516ccf15f
    [I 13:11:26.571 NotebookApp] Use Control-C to stop this server and shut down all
     kernels (twice to skip confirmation).
    [C 13:11:26.768 NotebookApp]
    
        To access the notebook, open this file in a browser:
            file:///C:/Users/Project/AppData/Roaming/jupyter/runtime/nbserver-3064-o
    pen.html
        Or copy and paste one of these URLs:
            http://localhost:8888/?token=28e7406ee648d631648f9b8c53e1f3027f5eb30516c
    cf15f
    [I 13:11:56.237 NotebookApp] Creating new notebook in
    [I 13:12:02.401 NotebookApp] Kernel started: 55d8fb5e-2fe7-4d4b-a1d3-a11b0b7e7e7
    d
    [I 13:12:05.242 NotebookApp] Adapting to protocol v5.1 for kernel 55d8fb5e-2fe7-
    4d4b-a1d3-a11b0b7e7e7d
    

    And the image where kernel is always busy

    kernel busy

    • Nihal Sangeeth
      Nihal Sangeeth about 5 years
      What is your version of ipykernel?
    • ohlr
      ohlr about 5 years
      did you try executing jupyter in a seperate conda environment?
    • ohlr
      ohlr about 5 years
      Could you resolve the error?
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      @NihalSangeeth its 5.1.0 , I have actually installed anaconda . I also tried 4. versions as welll no help
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      @ohlr yes I tried seperate environment also with python version 2.7 as well .
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      There is no change the kernel always remains busy irrespective of the browser as well. I have been trying to fix this since three days , almost spend 20 hrs in finding solutions
    • Nihal Sangeeth
      Nihal Sangeeth about 5 years
      pip install 'ipykernel<5.0.0' . Try this as a temporary workaround.
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      As I already told you i tried on older versions , it does not work . However if I follow your exact syntax even then it does not work .
    • ohlr
      ohlr about 5 years
      Can you provide a log of your terminal output?
    • Nihal Sangeeth
      Nihal Sangeeth about 5 years
      Is this problem specific to conda? Have you tried a different virtualenv ?
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      I tried creating new environment as well ,suceess at all . I dont think the problem is specific to conda as I also tried installing python 3.7 seperate and then installing jupyter notebook , it always keeps kernel busy , however kernel gets connected .
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      @ohlr do you mean the the logs in the prompt ?
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      interesting thing all other tools are working fine like spyder etc. the problem is specific to jupyter notebook
    • ohlr
      ohlr about 5 years
      just any logs you have, terminal output etc. - you say something about powershell error - hand us some traces - otherwise it's hard to see what's going on
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      @ohlr I have edited the question with the image and the logs nothing seems going wrong to me .. yet the kernel shows busy
    • ohlr
      ohlr about 5 years
      Do you have anaconda in your bashrc? I.e can you call it without running 'source anaconda/bin/activate'? If so please remove it
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      Well I am using windows 7 . Does that still apply ?
    • ohlr
      ohlr about 5 years
      yes, maybe the commands are different but the idea is the same.. have a look at point 8
    • ohlr
      ohlr about 5 years
      also you could try to pip install, jupyter within your conda environment.. hoping that it makes a difference
    • ohlr
      ohlr about 5 years
      and like I said earlyer, don't do stuff in the (base) environment.. instead make a new env for each project.
    • anand_v.singh
      anand_v.singh about 5 years
      Does it happen when you create a new notebook/ When you open an already existing notebook or both the times? Also is there a ipynb_checkpoints folder created when you open the notebook in a new directory?
    • Dnyanesh Khedekar
      Dnyanesh Khedekar about 5 years
      I have tried creating new conda enviroments . no difference. Spyder Ipython shell and other things work perfectly fine . Only problem with jupyter notebook . I am running it in chrome as my IE version is still 8 does that affect by any chance ?