Can't load pywin32 library win32gui

dutt picture dutt · Oct 18, 2010 · Viewed 20.1k times · Source

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?

Answer

DSblizzard picture DSblizzard · Apr 21, 2011

This works:

import pywintypes
#import pythoncom # Uncomment this if some other DLL load will fail
import win32gui