Default kernel in jupyter notebook (Python3) not working

柔情痞子 提交于 2020-02-07 02:25:07

问题


I installed Anaconda3 having Python 3.7.3 on Windows 10. When I launch Jupyter Notebook from Anaconda3 Navigator using environment: base(root), it shows kernel error and Python 3 (which is default kernel) as dead kernel.

The kernel error is:

Traceback (most recent call last): File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1699, in _execute result = await result File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\handlers.py", line 72, in post type=mtype)) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run value = future.result() File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run value = future.result() File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run value = future.result() File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel super(MappingKernelManager, self).start_kernel(**kwargs) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel km.start_kernel(**kwargs) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\jupyter_client\manager.py", line 240, in start_kernel self.write_connection_file() File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 547, in write_connection_file kernel_name=self.kernel_name File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 212, in write_connection_file with secure_write(fname) as f: File "C:\Users\Admin\Anaconda3\lib\contextlib.py", line 112, in enter return next(self.gen) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 100, in secure_write win32_restrict_file_to_user(fname) File "C:\Users\Admin\AppData\Roaming\Python\Python37\site-packages\jupyter_client\connect.py", line 53, in win32_restrict_file_to_user import win32api ImportError: DLL load failed: The specified procedure could not be found.

I am new to Python and anaconda, please help someone!


回答1:


Seeing the slew of error you are getting, i advise you to reinstall anaconda on windows 10. Kernel errors aren't easily solved. So, reinstalling is the easiest way to solve this... given link should help:===>

Installing anaconda on W10




回答2:


1)In jupyter notebook if you find "kernel dead" then click file and select close and halt option.When notebook gets closed you can go to kernel and click restart.

2) If the above instruction didn't work then uninstall and install the following packages

    jupyter_client
    jupyter_core
    ipykernel
    ipython
    ipython_genutils 
    traitlets


来源:https://stackoverflow.com/questions/58200576/default-kernel-in-jupyter-notebook-python3-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!