Reputation: 11
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?
Upvotes: 1
Views: 10590
Reputation: 8411
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.
Upvotes: 2
Reputation: 131
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
Upvotes: 6
Reputation: 127
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
Upvotes: 4