1
votes

I have a python program I wrote that I am trying to "compile" with py2exe, everything goes well and the executable is created. The first time I run the program I get this error:

Traceback (most recent call last): File "IMGui.py", line 13, in ImportError: No module named IMCrypt2

I found that if I manually add my custom modules to /lib/shared.zip and run the program again, I get THIS error:

Traceback (most recent call last): File "IMGui.py", line 13, in zipimport.ZipImportError: can't find module 'IMCrypt2'

I have been doing some extensive googling, 2 solutions I've found on the web were to delete the 'dist' and 'build' folders and try again, and to add "includes":"decimal" to my options, but neither of these solutions have worked for me D=

I'm using python 2.5 (I was using new version, but building with those were giving me other strange runtime errors, and the version I did successfully build on Windows 7 ONLY worked on Windows 7, so I'm trying again using Python 2.5 on Windows XP in an attempt to get a more 'universal' windows executable)

I'm completely stumped! Any help would be greatly appreciated!

1

1 Answers

1
votes

I solved my own problem (kinda), I was able to avoid this error and successfully 'compile' my code by consolidating all my modules in to a single file, so that no custom modules were imported. It resulted in some super messy code, but it worked!