Jupyter Notebook Kernel Error,PermissionError: [WinError 5] Access is denied

I am getting the following Kernel Error in Jupyter Notebook.

BlockquoteTraceback (most recent call last):
File “C:\Users\rfran\anaconda3\lib\site-packages\tornado\web.py”, line 1704, in _execute
result = await result
File “C:\Users\rfran\anaconda3\lib\asyncio\tasks.py”, line 328, in __wakeup
future.result()
File “C:\Users\rfran\anaconda3\lib\site-packages\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “C:\Users\rfran\anaconda3\lib\site-packages\notebook\services\sessions\handlers.py”, line 74, in post
model = yield maybe_future(
File “C:\Users\rfran\anaconda3\lib\site-packages\tornado\gen.py”, line 762, in run
value = future.result()
File “C:\Users\rfran\anaconda3\lib\site-packages\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “C:\Users\rfran\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py”, line 98, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File “C:\Users\rfran\anaconda3\lib\site-packages\tornado\gen.py”, line 762, in run
value = future.result()
File “C:\Users\rfran\anaconda3\lib\site-packages\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “C:\Users\rfran\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py”, line 110, in start_kernel_for_session
kernel_id = yield maybe_future(
File “C:\Users\rfran\anaconda3\lib\site-packages\tornado\gen.py”, line 762, in run
value = future.result()
File “C:\Users\rfran\anaconda3\lib\asyncio\futures.py”, line 201, in result
raise self._exception
File “C:\Users\rfran\anaconda3\lib\asyncio\tasks.py”, line 256, in __step
result = coro.send(None)
File “C:\Users\rfran\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py”, line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File “C:\Users\rfran\anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py”, line 186, in start_kernel
km.start_kernel(**kwargs)
File “C:\Users\rfran\anaconda3\lib\site-packages\jupyter_client\manager.py”, line 341, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, **kw)
File “C:\Users\rfran\anaconda3\lib\site-packages\jupyter_client\manager.py”, line 249, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File “C:\Users\rfran\anaconda3\lib\site-packages\jupyter_client\launcher.py”, line 132, in launch_kernel
proc = Popen(cmd, **kwargs)
File “C:\Users\rfran\anaconda3\lib\subprocess.py”, line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “C:\Users\rfran\anaconda3\lib\subprocess.py”, line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
PermissionError: [WinError 5] Access is denied

Any idea how to fix this?

1 Like

dear Robin_Francis.

thank you for posting.

A similar phenomenon has been reported on StackOverflow.

After investigating the cause, it seems that the following solutions have been resolved.

I had the same error. For me, it turned out the file mentioned in the (access denied) error was still held by the system in the background from previous run. I ended the process in the Task Manager of Windows and problem solved.

Regards, you.
ktsh.tanaka.2020