<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><p>I'm embedding Python27 in my app.  I have users install 
ActivePython27 in order to take advantage of python in my app, so the 
python installation can't be touched as it's on the end user's machine.</p><p>When I attempt to do:<br>
>import win32api</p><p>i get this:<br>
>Traceback (most recent call last):<br>
>  File "startup.py", line 5, in<br>
>ImportError: DLL load failed: The specified module could not be found.</p><p>I someone suggested i manually load the dependent libraries in the correct order, like this:</p><p>>import pywintypes<br>
>import pythoncom<br>
>import win32api</p><p>but then i get this:<br>
>Traceback (most recent call last):<br>
>  File "startup.py", line 3, in<br>
>  File "C:\Python27\lib\site-packages\win32\lib\pywintypes.py", line 124, in<br>
>    __import_pywin32_system_module__("pywintypes", globals())<br>
>  File "C:\Python27\lib\site-packages\win32\lib\pywintypes.py", line 64, in __import_pywin32_system_module__<br>
>    import _win32sysloader<br>
ImportError: DLL load failed: The specified module could not be found.</p><p>the ultimate goal here is actually to do this:<br>
>from win32com.client.gencache import EnsureDispatch</p><p>which currently yields:<br>
>Traceback (most recent call last):<br>
>  File "startup.py", line 3, in<br>
>  File "C:\Python27\lib\site-packages\win32com\__init__.py", line 5, in<br>
>    import win32api, sys, os<br>
>ImportError: DLL load failed: The specified module could not be found.</p><p>So, if anyone has any idea, that would be super duper great.  thanks so much!</p><p>notes:<br>
my paths are definitely set correctly, as i used the activepython installer<br>
when i run my script the first thing i see in the output window is:</p><p>> 'kJams 2 Debug.exe': Loaded 'C:\Python27\Lib\site-packages\win32\win32api.pyd'<br>
> 'kJams 2 Debug.exe': Loaded 'C:\Windows\SysWOW64\pywintypes27.dll'<br>
> 'kJams 2 Debug.exe': Unloaded 'C:\Python27\Lib\site-packages\win32\win32api.pyd'<br>
> 'kJams 2 Debug.exe': Unloaded 'C:\Windows\SysWOW64\pywintypes27.dll' </p><p>so i know it is finding those libraries</p><p>i've searched the intertubes and found many, many people with this 
problem, over the years, but no real solutions.  "reinstall" they say, 
well, i've done that several times.  anyone know why this is?</p></body></html>