Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't load pywin32 library win32gui

Tags:

python

pywin32

I'm trying to use the win32gui module included with pywin32 but I can't get it working.

I have downloaded it, built it and everything seem to be located under site-packages, I've found win32gui.pyd at site-packages/win32/win32gui.pyd but when I try to import it I get:

import pyHook, win32gui
ImportError: DLL load failed: The specified module could not be found.

Do I need to move a dll somewhere? and if so, which one?

like image 948
dutt Avatar asked Oct 18 '10 02:10

dutt


3 Answers

This works:

import pywintypes
#import pythoncom # Uncomment this if some other DLL load will fail
import win32gui
like image 52
DSblizzard Avatar answered Sep 19 '22 20:09

DSblizzard


I had the same issue. I added the path where pywintypes34.dll to system path and it worked.

In my case it was C:\Python34\Lib\site-packages\pywin32_system32

like image 22
Madhan Ganesh Avatar answered Sep 19 '22 20:09

Madhan Ganesh


My guess is that win32gui depends on some DLL that is not on your system. You can download depends and see what you're missing.

However my first attempt will be try installing pywin32 from the installer, not by building it.

like image 32
lazy1 Avatar answered Sep 21 '22 20:09

lazy1