Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jupyter - Failed to start the kernel #5688

Closed
racine101 opened this issue Aug 20, 2020 · 2 comments
Closed

jupyter - Failed to start the kernel #5688

racine101 opened this issue Aug 20, 2020 · 2 comments

Comments

@racine101
Copy link

racine101 commented Aug 20, 2020

working in windows 10, I downloaded and install anaconda to use jupyter notebook, When I run jupyter notebook, the notebook launches but the kernel fails to start and I get below error. Please help. Thank you!


Traceback (most recent call last):
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\web.py", line 1703, in _execute
result = await result
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\kultu\anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 69, in post
model = yield maybe_future(
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\kultu\anaconda3\lib\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\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\kultu\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 100, in start_kernel_for_session
kernel_id = yield maybe_future(
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "C:\Users\kultu\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\jupyter_client\multikernelmanager.py", line 186, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\jupyter_client\manager.py", line 304, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\jupyter_client\manager.py", line 251, in pre_start_kernel
self.write_connection_file()
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\jupyter_client\connect.py", line 468, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:\Users\kultu\anaconda3\lib\contextlib.py", line 113, in enter
return next(self.gen)
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py", line 435, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\kultu\AppData\Roaming\Python\Python38\site-packages\jupyter_core\paths.py", line 361, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: %1 is not a valid Win32 application.

@kevin-bates
Copy link
Member

Hi @racine101 - This is usually an issue with the installation of pywin32. This #4980 (comment) might prove helpful to you. I would recommend adding --force-reinstall or uninstall pywin32 prior to the install command since you have the package installed.

If that doesn't help, try searching the issues (or internet in general), as this has been reported before.

@racine101
Copy link
Author

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants