Dear David: Perhaps someone on this list can give a better answer than the one I am about to give -- because I don't like what I am going to say...
ActiveState repackages Python, pywin32, and several other products in order to make it easier to install all of them together, and they call their package Active Python. We here in the pywin32 community don't really know what they may have done with their installer which might be contributing to your problem. Obviously, the .dll files are not where the loader expects them to be (or are incorrectly protected) but where they are, and how to fix the problem, we don't know. At least, I do not. May I suggest that you try ActiveState support at http://community.activestate.com/forum ? They also have commercial support and you could surely find help that way. Again, I apologise for giving such an unhelpful answer. -- Vernon Cole On Wed, Sep 4, 2013 at 4:53 PM, David M. Cotter <d...@kjams.com> wrote: > 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. > > When I attempt to do: > >import win32api > > i get this: > >Traceback (most recent call last): > > File "startup.py", line 5, in > >ImportError: DLL load failed: The specified module could not be found. > > I someone suggested i manually load the dependent libraries in the correct > order, like this: > > >import pywintypes > >import pythoncom > >import win32api > > but then i get this: > >Traceback (most recent call last): > > File "startup.py", line 3, in > > File "C:\Python27\lib\site-packages\win32\lib\pywintypes.py", line 124, > in > > __import_pywin32_system_module__("pywintypes", globals()) > > File "C:\Python27\lib\site-packages\win32\lib\pywintypes.py", line 64, > in __import_pywin32_system_module__ > > import _win32sysloader > ImportError: DLL load failed: The specified module could not be found. > > the ultimate goal here is actually to do this: > >from win32com.client.gencache import EnsureDispatch > > which currently yields: > >Traceback (most recent call last): > > File "startup.py", line 3, in > > File "C:\Python27\lib\site-packages\win32com\__init__.py", line 5, in > > import win32api, sys, os > >ImportError: DLL load failed: The specified module could not be found. > > So, if anyone has any idea, that would be super duper great. thanks so > much! > > notes: > my paths are definitely set correctly, as i used the activepython installer > when i run my script the first thing i see in the output window is: > > > 'kJams 2 Debug.exe': Loaded > 'C:\Python27\Lib\site-packages\win32\win32api.pyd' > > 'kJams 2 Debug.exe': Loaded 'C:\Windows\SysWOW64\pywintypes27.dll' > > 'kJams 2 Debug.exe': Unloaded > 'C:\Python27\Lib\site-packages\win32\win32api.pyd' > > 'kJams 2 Debug.exe': Unloaded 'C:\Windows\SysWOW64\pywintypes27.dll' > > so i know it is finding those libraries > > 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? > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > https://mail.python.org/mailman/listinfo/python-win32 > >
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32