I have encountered a similar problem only in notebook. I couldn’t fix the error, but I started using jupyter notebook in visual code. In this case, everything worked.
Errors in my case:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\web.py", line 1704, in _execute
result = await result
File "C:\ProgramData\Anaconda3\lib\asyncio\tasks.py", line 328, in __wakeup
future.result()
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 74, in post
model = yield maybe_future(
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\ProgramData\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:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 110, in start_kernel_for_session
kernel_id = yield maybe_future(
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\gen.py", line 762, in run
value = future.result()
File "C:\ProgramData\Anaconda3\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "C:\ProgramData\Anaconda3\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "C:\ProgramData\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:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 186, in start_kernel
km.start_kernel(**kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 341, in start_kernel
self.kernel = self._launch_kernel(kernel_cmd, **kw)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 249, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\launcher.py", line 132, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The specified file cannot be found