Posted by de José Lopes
When you get the following message its due to a compatibility problem between py2exe and PIL library.
File "Image.pyc", line 1571, in open IOError: cannot identify image file
To solve this problem one must declare explicitly the PIL libraries that must be imported.
So, on the python file that we want ot generate the exe, they must ne declared like for example:
import Image import BmpImagePlugin # if you are using bitmaps import JpgImagePlugin # if you are using jpg import PngImagePlugin # if you are using png
The explicit declaring of these imports may not be necessary if you are running puthon from a shell, but they will be necessary to run the exe file generated by py2exe.