notebook: Getting Kernel Error while running Jupyter Notebook in Python3
I am getting a kernel error while running Jupyter Notebook in python 3 .On running
Jupyter kernelspeclist
I am getting-
Available kernels:
python3 /home/rishav/.local/share/jupyter/kernels/python3 python2 /usr/local/share/jupyter/kernels/python2
I am running it under tensorflow virtual environment.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 45 (15 by maintainers)
This is a different issue than the original post and more likely related to #4907. Please first upgrade jupyter_client (e…g,
pip install jupyter_client --upgrade) which should bring jupyter_client to5.3.4and jupyter_core to4.6.1. If the issue persists, please provide the relative traceback as there will be additional information provided. Thanks.@Rishav09 I had a similar error while using tensorflow. I think the problem exists in the path which points to the python executable. I did ‘jupyter kernelspec list’ which spit out
Upon examining this directory closely I found kernel.json had argv with path to python executable incorrectly stated. It had
There was no ‘bin’ directory but python executable was present directly inside ‘uterm1’ so i edited the path removing ‘bin’ to finally include
in kernel.json
This solved my problem and everything worked as it used to. Conclusion: Edit the path in
kernel.jsonto correctly point to python executable. Hope this helps !!@BurhanAHanif - You might try taking a look at https://github.com/jupyter/notebook/issues/2301#issuecomment-287119893 and the surrounding comments/instructions.
in case it might help: @Rishav09 I had a similar issue after deleting older python version (3.6) and it seems fixed after editing (changing to 3.7)
kernel.jsonin the folder indicated byjupyter kernelspec listProbably your python3 kernelspec points to a Python executable that no longer exists. Try installing a kernelspec from your tensorflow environment.
@kevin-bates your a life saver sir. felt like putting my head through a wall
Please start with this comment.
yup…Googled it… everything working fine at the moment…
Thanks for help it worked for me… much appreciated!
You’re using the older modules of juypter_client and jupyter_core. Follow the steps to upgrade those modules (above) and please report back results after that upgrade and restarting your Notebook server. If failures still occur, it’s likely an issue with a mounted filesystem.