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

4 Answers4

6

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
  • 131
  • 2
4

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
  • 127
  • 1
  • 10
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
  • 7,438
  • 1
  • 5
  • 13
0

Installing the relevant binary from github worked for me

Nnaobi
  • 399
  • 3
  • 12