[PyQt] PyQt app: gif files don't show after compiling with py2exe

Umit Oztosun umit at oztosun.net
Mon Jan 31 10:56:33 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 had a similar case for one application. You might need to include
msvcr90.dll, msvcp90.dll and Microsoft.VC90.CRT.manifest (Visual C
Runtime related files) in your distribution. Please note that these
files must also exist in imageformats\ directory. My dist directory
looks like this:

dist\py2exe_generated_files, main.exe, ...
dist\msvcr90.dll
dist\msvcp90.dll
dist\Microsoft.VC90.CRT.manifest
dist\imageformats\qgif4.dll
dist\imageformats\qjpeg4.dll
dist\imageformats\qsvg4.dll
dist\imageformats\msvcr90.dll
dist\imageformats\msvcp90.dll
dist\imageformats\Microsoft.VC90.CRT.manifest

You should check MS VS license files to see whether you can distribute
these files though.

Another option might be to install Microsoft Visual C++ 2008
Redistributable Package (not sure about this) from
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en

Hope this helps.
--
Umit


More information about the PyQt mailing list