I can't make py2exe to pack correctly even a simple script that uses win32file I'm constantly getting the following error message:
Traceback (most recent call last):
File "dependency_checker.py", line 1, in <module>
File "win32file.pyc", line 12, in <module>
File "win32file.pyc", line 10, in __load
ImportError: DLL load failed: The specified procedure could not be found.
The script looks as follows:
import win32file
print "Hello world!"
And here is the setup.py:
from distutils.core import setup
import py2exe
setup(console=['dependency_checker.py'])
Have you had similar problem before?
Versions:
Python 2.6.2, py2exe 0.6.9, pywin32-214, Windows 7 and Windows XP Pro as target machine
UPDATE:
- I can run the bundled program on my windows 7 where it was created but I can't run it on the XP machine.
The part of win32file.pyc that throws the error looks as follows:
>>> imp.load_dynamic('win32file', r'C:\test\setup-test\src\dist\win32file.pyd')
The line above on my dev box (windows 7) runs correctly while on test box (windows XP) returns the error.
** UPDATE 2: **
When I use imp.load_dynamic to load win32file form python installation then I can reload the win32file.pyd for the dist folder without the error.