I have recently installed Anaconda and am running Jupyter Notebook 6.1.4 on Windows 10.
I am in the base(root) environment and I haven't created any new environments.
Jupyter opens fine, but when I create a new Python 3 notebook I immediately get a Kernel error which prevents any cells from being run.
The error is:
Traceback (most recent call last):
File "C:UserskaimajerusAnaconda3libsite-packagesornadoweb.py", line 1703, in _execute
result = await result
File "C:UserskaimajerusAnaconda3libsite-packagesornadogen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:UserskaimajerusAnaconda3libsite-packages
otebookservicessessionshandlers.py", line 69, in post
model = yield maybe_future(
File "C:UserskaimajerusAnaconda3libsite-packagesornadogen.py", line 735, in run
value = future.result()
File "C:UserskaimajerusAnaconda3libsite-packagesornadogen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:UserskaimajerusAnaconda3libsite-packages
otebookservicessessionssessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:UserskaimajerusAnaconda3libsite-packagesornadogen.py", line 735, in run
value = future.result()
File "C:UserskaimajerusAnaconda3libsite-packagesornadogen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:UserskaimajerusAnaconda3libsite-packages
otebookservicessessionssessionmanager.py", line 100, in start_kernel_for_session
kernel_id = yield maybe_future(
File "C:UserskaimajerusAnaconda3libsite-packagesornadogen.py", line 735, in run
value = future.result()
File "C:UserskaimajerusAnaconda3libsite-packages
otebookserviceskernelskernelmanager.py", line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File "C:UserskaimajerusAnaconda3libsite-packagesjupyter_clientmultikernelmanager.py", line 185, in start_kernel
km.start_kernel(**kwargs)
File "C:UserskaimajerusAnaconda3libsite-packagesjupyter_clientmanager.py", line 309, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:UserskaimajerusAnaconda3libsite-packagesjupyter_clientmanager.py", line 256, in pre_start_kernel
self.write_connection_file()
File "C:UserskaimajerusAnaconda3libsite-packagesjupyter_clientconnect.py", line 468, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File "C:UserskaimajerusAnaconda3libsite-packagesjupyter_clientconnect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:UserskaimajerusAnaconda3libcontextlib.py", line 113, in __enter__
return next(self.gen)
File "C:UserskaimajerusAnaconda3libsite-packagesjupyter_corepaths.py", line 435, in secure_write
win32_restrict_file_to_user(fname)
File "C:UserskaimajerusAnaconda3libsite-packagesjupyter_corepaths.py", line 369, in win32_restrict_file_to_user
sd = win32security.GetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION)
pywintypes.error: (50, 'GetFileSecurity', 'The request is not supported.')
question from:
https://stackoverflow.com/questions/65923381/how-do-i-solve-a-kernel-error-in-jupyter-notebook