The problem It seems that there is a conflict between two possible dependencies. The file jpeg.dll
is included from the JRE (on Windows, something like C:\Program Files\Java\jre6\bin\
), but it is the wrong one. It should be included from the Pygame directory, located within your Python installation, at C:\Python31\lib\site-packages\pygame\
. Don't know why cx_Freeze prefers the one from the JRE, though…
How to fix it? It is quite easy. Just copy the correct file (the one from Pygame) to the directory in which you execute the cx_Freeze script. When you will start it, the script will look in the current directory first, and will find the correct jpeg.dll
. Your executable should be able to import PNG images now.