1

When I try using Jupyter notebook, kernel error appears like this

import win32api
ImportError: DLL load failed while importing win32api:

After connecting vs code to jupyter notebook, error appears.

I've already tried

conda install pywin32

and copied the two files from [installation directory of Anaconda]\Lib\site-packages\pywin32_system32 to C:\Windows\System32

but it didn't work.

how to fix?

brighteast
  • 11
  • 1
  • 2

3 Answers3

5

Try installing it using pip, it can solve your problem here

pip install --upgrade pywin32==225

Or this, if you don't have the package already

pip install pywin32==225
Alama1
  • 121
  • 2
2

After activating the env where the above is causing issue uninstall win32api (if it is installed):

pip uninstall pywin32

Then use pip to install pywin32:

pip install pywin32

Jupyter should work afterward. The solution is proposed here by ValentinVerschinin

polyglot
  • 97
  • 1
  • 8
2

Are you using Python 3.8? It seems to be a Python 3.8 specific problem.

Can you try to install the pywin32==225?

You can refer to this page.

Steven-MSFT
  • 5,738
  • 1
  • 3
  • 11