Jupyter notebook kernel died (Mac)

Yesterday my kernel died while I was checking the output of a statement and it’s still in the same state. When it happened I had been coding for at least 4 hours and I haven’t downloaded any apps or changed anything inside the system that could interfere with it. I’ve been using it for a year now and this is the first time this has happened.

The following notice appears when I try to restart the kernel:
The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.

When I attempt to run:
The kernel appears to have died. It will restart automatically.

Things I’ve done:

  • Restarted, reconnected, shut down the kernel
  • Opening it as admin
  • Uninstalled it, deleted all the files related to anaconda and installed it again (cleaned the cache and used Clean My Mac X to get rid of all the files)
  • Installed by adding it to a specific file under my admin account (Applications in Mac)
  • Shut down & Restarted the computer
  • Run conda update --all
  • Uninstalling ipykernel, ipython, jupyter_client, jupyter_core, traitlets, ipython_genutils and then install again.
  • Run conda update ipykernel

I also raun the following:

conda remove ipykernel ipython jupyter_client jupyter_core traitlets ipython_genutils

conda clean -tipsy

conda install ipykernel ipython jupyter_client jupyter_core traitlets ipython_genutils

jupyter notebook 

Nothing has worked so far

My terminal displays the following:

        The default interactive shell is now zsh.
        To update your account to use zsh, please run `chsh -s /bin/zsh`.
        For more details, please visit https://support.apple.com/kb/HT208050.
        /Users/martaramos/Applications/anaconda3/bin/jupyter_mac.command ; exit;
        (base) Martaaaa:~ martaramos$ /Users/martaramos/Applications/anaconda3/bin/jupyter_mac.command ; exit;
        [I 11:25:26.214 NotebookApp] JupyterLab extension loaded from /Users/martaramos/Applications/anaconda3/lib/python3.8/site-packages/jupyterlab
        [I 11:25:26.215 NotebookApp] JupyterLab application directory is /Users/martaramos/Applications/anaconda3/share/jupyter/lab
        [I 11:25:26.219 NotebookApp] Serving notebooks from local directory: /Users/martaramos
        [I 11:25:26.219 NotebookApp] Jupyter Notebook 6.1.4 is running at:
        [I 11:25:26.219 NotebookApp] http://localhost:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
        [I 11:25:26.219 NotebookApp]  or http://127.0.0.1:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
        [I 11:25:26.219 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
        [C 11:25:26.227 NotebookApp] 
            
            To access the notebook, open this file in a browser:
                file:///Users/martaramos/Library/Jupyter/runtime/nbserver-4059-open.html
            Or copy and paste one of these URLs:
                http://localhost:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
             or http://127.0.0.1:8888/?token=7b0415ea1961f656dd70d66b802bb0bc60eb0db701b7adbb
        [I 11:25:36.295 NotebookApp] Kernel started: a95fd5dc-468f-4a47-8b16-cb41f585cde1, name: python3
        [I 11:25:42.294 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
        kernel a95fd5dc-468f-4a47-8b16-cb41f585cde1 restarted
        [I 11:26:00.302 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
        kernel a95fd5dc-468f-4a47-8b16-cb41f585cde1 restarted
        [I 11:27:37.852 NotebookApp] Saving file at /Desktop/Python/Section 6.ipynb

change max buffer size in jupyter config
many people solved the same problem through this.
for me, the exact same code not worked in my new macbook pro labtop, where it worked in my ubuntu desktop and colab as well. and it seems like it solved the problem so far(i need to check a bit more though)

so sorry. jupyter still die after change that. i finally figure out the solution. remove all related to ipykernel and re-install the downgraded version. What is related? ipython, ipykernel, jupyter_client etc.

Same issue happening with M2 Max, can you tell which version did you downgrade to?