ipykernel: Unable to run kernel
When I try to open a notebook using the Python 3 kernel, I get the following output.
[I 12:29:22.834 NotebookApp] Kernel started: 5e226817-b874-4f6c-9573-be8bcc723690
/data/tmacey/.virtualenvs/data-analytics/bin/python: Error while finding spec for 'ipykernel.__main__' (<class 'ImportError'>: No module named 'logconfig'); 'ipykernel' is a package and cannot be directly executed
[I 12:29:25.834 NotebookApp] KernelRestarter: restarting kernel (1/5)
/data/tmacey/.virtualenvs/data-analytics/bin/python: Error while finding spec for 'ipykernel.__main__' (<class 'ImportError'>: No module named 'logconfig'); 'ipykernel' is a package and cannot be directly executed
[I 12:29:28.840 NotebookApp] KernelRestarter: restarting kernel (2/5)
/data/tmacey/.virtualenvs/data-analytics/bin/python: Error while finding spec for 'ipykernel.__main__' (<class 'ImportError'>: No module named 'logconfig'); 'ipykernel' is a package and cannot be directly executed
[I 12:29:31.843 NotebookApp] KernelRestarter: restarting kernel (3/5)
/data/tmacey/.virtualenvs/data-analytics/bin/python: Error while finding spec for 'ipykernel.__main__' (<class 'ImportError'>: No module named 'logconfig'); 'ipykernel' is a package and cannot be directly executed
[W 12:29:33.487 NotebookApp] Timeout waiting for kernel_info reply from 5e226817-b874-4f6c-9573-be8bcc723690
[I 12:29:34.846 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 5e226817-b874-4f6c-9573-be8bcc723690 restarted
/data/tmacey/.virtualenvs/data-analytics/bin/python: Error while finding spec for 'ipykernel.__main__' (<class 'ImportError'>: No module named 'logconfig'); 'ipykernel' is a package and cannot be directly executed
[W 12:29:37.852 NotebookApp] KernelRestarter: restart failed
[W 12:29:37.852 NotebookApp] Kernel 5e226817-b874-4f6c-9573-be8bcc723690 died, removing from map.
ERROR:root:kernel 5e226817-b874-4f6c-9573-be8bcc723690 restarted failed!
[W 12:29:37.863 NotebookApp] Kernel deleted before session
[W 12:29:37.864 NotebookApp] 410 DELETE /api/sessions/d8d3f8c2-1fdc-4d5d-b52d-07afb925587b (::1) 1.70ms referer=http://localhost:8888/notebooks/Untitled.ipynb
I am using IPython, Jupyter and ipykernel v4.0.3 with Python 3.4.3 on Linux.
Linux kommandcenter 4.1.5-1-MANJARO #1 SMP PREEMPT Tue Aug 11 05:14:23 UTC 2015 x86_64 GNU/Linux
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 42 (15 by maintainers)
I had the same problem after installing matplotlib. I had to uninstall both matplotlib and ipython/ipython notebooks, and reinstall with
pip install "ipython[notebook]" --upgradeI had the same error, using Python v3.4.3 with Jupyter (v4.x) on Ubuntu GNU/Linux.
Error while finding spec for 'ipykernel.__main__' (<class 'ImportError'>: cannot import name 'decorator'); 'ipykernel' is a package and cannot be directly executedI couldn’t solve this problem, but then I noticed that, in the same folder I was running
jupyter notebook, I had a file calleddecorator.py. Therefore, I renamed it to something else for avoiding name conflicts. And now it works. 😀I’m getting a similar thing without reference to logconfig:
Update: mine seems to have been caused by an old system ipython package from Ubuntu and worked after removing all the old ipython/ipython-notebook packages and reinstalling them via pip
Yup, install that…
I wonder if you have an old version of pip - try running:
How I fixed it!
I had made a custom package called
ioin the directory from where I was starting my Jupyter notebook. I removed thatiopackage and the problem got resolved.Check if you have any packages in the folder from where you are starting your jupyter notebook.
@takluyver Thanks for following me through this travale…I did remove the system installed Ipython via APT I also reinstalled using:
and that changed the error message for the p2 kernel to