I cannot seem to get py2exe to work properly. I have run "python setup.py py2exe" in cmd, as well as "python setup.py install"... and When I try to run my executable setup, I get this same error over and over:
After a week I'm starting to get quite frustrated and I'm hoping to be able to resolve the issue today.
I'm using Python 2.7 and py2exe v0.6.9. 64-bit Windows7
FINALLY, I can die a happy man. After agonizing over this problem for over a week, I figured out that the issue is that I had to download the 64bit version of py2exe from SourceForge. The "Get Latest Version" link that they have at the top is for Python 2.5, which is very misleading because I would have assumed it would at least use the latest version of PYTHON that it supports, which I believe is the version I have, Python 2.7.1.
I had to go into the "Browse All Files" section and manually navigate to v0.6.9 and then pick the appropriate version.
I am now able to create an executable from running "C:\Python27\setup.py py2exe".
thanks all for your help/replies.
The most important lines in that error are the last two -
import py2exe_util
ImportError: DLL load failed: The specified module could not be found.
That means py2exe was not installed completely in the first place. Try re-installing it.
You need a version of py2exe that matches the architecture of your python install. If you have a 32bit python install you need a win32 py2exe installer. If you have a x64 python install you need a win64 py2exe installer.
In my case I am on a 64bit machine with a 32bit python install. The Source Forge 'latest' link gave the win64 version of py2exe (because it detected my machine type). But it didn't work, I kept getting the following error:
ImportError: DLL load failed with error code 193
I needed to go back to Source Forge and 'Browse all files' to find the win32 version.
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