Kernel error in Jupyter Notebook, failed installing win32api

Hi there!
I’ve tried to run Jupyter Notebook using Miniconda on Windows 10, Python 3.9 already installed.
After I launched a session JN interface showed me an error:
Traceback (most recent call last):
File “c:\users\79885\python39\lib\site-packages\tornado\web.py”, line 1704, in _execute
result = await result
File “c:\users\79885\python39\lib\site-packages\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “c:\users\79885\python39\lib\site-packages\notebook\services\sessions\handlers.py”, line 69, in post
model = yield maybe_future(
File “c:\users\79885\python39\lib\site-packages\tornado\gen.py”, line 762, in run
value = future.result()
File “c:\users\79885\python39\lib\site-packages\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “c:\users\79885\python39\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\79885\python39\lib\site-packages\tornado\gen.py”, line 762, in run
value = future.result()
File “c:\users\79885\python39\lib\site-packages\tornado\gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “c:\users\79885\python39\lib\site-packages\notebook\services\sessions\sessionmanager.py”, line 110, in start_kernel_for_session
kernel_id = yield maybe_future(
File “c:\users\79885\python39\lib\site-packages\tornado\gen.py”, line 762, in run
value = future.result()
File “c:\users\79885\python39\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\79885\python39\lib\site-packages\jupyter_client\multikernelmanager.py”, line 186, in start_kernel
km.start_kernel(**kwargs)
File “c:\users\79885\python39\lib\site-packages\jupyter_client\manager.py”, line 337, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File “c:\users\79885\python39\lib\site-packages\jupyter_client\manager.py”, line 286, in pre_start_kernel
self.write_connection_file()
File “c:\users\79885\python39\lib\site-packages\jupyter_client\connect.py”, line 466, in write_connection_file
self.connection_file, cfg = write_connection_file(self.connection_file,
File “c:\users\79885\python39\lib\site-packages\jupyter_client\connect.py”, line 136, in write_connection_file
with secure_write(fname) as f:
File “c:\users\79885\python39\lib\contextlib.py”, line 117, in enter
return next(self.gen)
File “c:\users\79885\python39\lib\site-packages\jupyter_core\paths.py”, line 461, in secure_write
win32_restrict_file_to_user(fname)
File “c:\users\79885\python39\lib\site-packages\jupyter_core\paths.py”, line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api

I’ve tried to install win32api (using anaconda powershell promt). but it seems like the key problem is that I can’t install “pywin32_postinstall” module. Every time I try to run installing, terminal gives following respond

If anyone got a clue how to fix it or faced with same problem in Jupyter, please help!

Hi Virtnomad1792,

I not sure if this will resolve your issue but make sure both Python and PyWin32 are the same bit version (32 or 64 bit). Both must be the same. You can download the appropriate extension at the Unofficial Windows Binaries. You can also make sure you have the latest version of pywin32 at:
Releases · mhammond/pywin32 · GitHub.
I hope this helps you out!

Thank you a lot! Finally that helped!