I am attempting to run a py2exe'd program (package.py) that includes pysvn. It is failing to run with the following error:
Traceback (most recent call last):
File "package.py", line 27, in <module>
File "zipextimporter.pyc", line 82, in load_module
File "pysvn\__init__.pyc", line 99, in <module>
File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading pysvn\_pysvn_2_6.pyd
The script runs fine for others in the office, the difference being I'm on Windows 7 x64 with them on WinXP x86. I do have _pysvn_2_6.pyd in my pysvn directory.
Py2exe's "Problems to be Fixed" page has a similar error message with WxPython where it cannot find a needed system module, but I am not using WxPython and I have the dll they refer to anyway.
The py2exe page for "Working with Various Packages and Modules" doesn't refer to pysvn, and I can't find anyone else with similar problems.
I've checked the output of py2exe as outlined by this answer, but my computer seems to have all the binary files required in the correct locations.
EDIT: I just tried to run other py2exe created programs on this same machine and they failed as well. It seems that the problem is with my machine (ie x64) rather than the specific program I was converting; I get a similar error with another program:
Traceback (most recent call last):
File "rundemo.py", line 13, in <module>
import win32api as w32
File "zipextimporter.pyc", line 98, in load_module
ImportError: MemoryLoadLibrary failed loading win32api.pyd
EDIT2: I tried the py2exe programs generated from my 64 bit compy on a 32 bit machine, and they failed with the same error. I think I'm generating 32 bit exe's (py2exe docs say 64-bit support is experimental, and I haven't explicitly turned it on), but I'm not sure how to check to be sure.