[PyQt] PyQt app: gif files don't show after compiling with py2exe
Stephen Dranger
dranger at gmail.com
Mon Jan 31 10:11:46 GMT 2011
For some reason on my system (Windows XP 32-bit, Python 2.6) PyQt is
able to display gifs perfectly when run in the python interpreter, but
when I run it through py2exe, they no longer display.
I've tried everything I've googled: copying the gif DLLs from PyQt
into an imageformats/ folder, setting up a qt.conf (as another
stackoverflow thread suggested), done a setLibraryPaths to where the
imageformat DLLs were, copied the setup file from
http://wiki.wxpython.org/py2exe-python26 .
Nothing seems to work -- what on earth could I be doing wrong?
I did some tests, and I found (via ProcessExplorer) that when I run it
as a python script, it loads the Qgif.DLL from
C:\Python26\Lib\<pathtoQTDLLs>. When I copy those files and move them
to imageformats inside the dist/ directory, the application made from
py2exe uses them -- but it still doesn't work. It seems that both the
python script running and the py2exe executable both use the exact
same DLLs (except that py2exe doesnt seem to load socket libs, but
that's fine because network stuff runs perfectly fine).
What might be another symptom is that the pygame.mixer module works in
the same way -- it works fine in a python script, but doesn't work at
all in a py2exe executable.
More information about the PyQt
mailing list