I have encountered the same problem many times, but I have learned how to deal with it.
Problem There seems to be a conflict between the two possible dependencies. The jpeg.dll file jpeg.dll included in the JRE (on Windows, something like C:\Program Files\Java\jre6\bin\ ), but it is incorrect. It should be included in the Pygame directory located inside your Python installation, in C:\Python31\lib\site-packages\pygame\ . I don't know why cx_Freeze prefers one of the JREs though ...
How to fix it? This is pretty easy. Just copy the correct file (the one from Pygame) to the directory in which you are running the cx_Freeze script. When you run it, the script will first search in the current directory and find the correct jpeg.dll . Your executable file should be able to import PNG images.
user1125519
source share