I am attempting to bundle up a Python application using py2exe 0.6.9 and Python 2.6.4 on Windows. While the executable runs just fine on the system I used to build it, it fails when I attempt to run it on another system:
C:\Documents and Settings\Administrator\Desktop\dist>.\backend.exe install
Traceback (most recent call last):
File "boot_service.py", line 6, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "win32serviceutil.pyo", line 9, in <module>
File "zipextimporter.pyo", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd
I have a strong hunch that I'm missing a library, but I'm unsure which—especially since the dependency checker isn't flagging anything as missing on the target system. How should I proceed?
same question as https://stackoverflow.com/questions/1979486/py2exe-win32api-pyc-importerror-dll-load-failed.
look at setup.py, just excludes these dlls which are included in the system.
'dll_excludes': [ "mswsock.dll", "powrprof.dll" ]
it will help you!
You can do the dll and dependency check manually. When you generate the exe i am sure you have noticed that it prints out the dll's that are required/used. Check on the system, where the exe is not working, if the dll's exist and if they are the same version.
One other thing. Are you copying the whole dist folder to the system or just the exe, because you need the whole dist folder and not just the exe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With