[PyQt] PyQt app: gif files don't show after compiling with py2exe
Stephen Dranger
dranger at gmail.com
Tue Feb 1 18:44:36 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
I have tried adding the MS VC files to the directory; it had no
effect. Copying imageformats to the application directory was one of
the first things I tried; that does not work as well.
I've actually gotten the application to work with cx_freeze -- in that
case, I did not need to copy the MS VC DLLs to either the application
directory or the imageformats directory. I've also tried copying the
DLLs from the build folder cx_freeze creates over to the dist folder
that py2exe creates to no avail.
--Stephen
More information about the PyQt
mailing list