[PyQt] cxfreeze

V. Armando Sole sole at esrf.fr
Mon Nov 3 11:22:55 GMT 2008


At 12:00 03/11/2008 +0100, l you wrote:
>I hope that you can help me.
>I'm uder linux and i neeed tu make a binary of one test program.
>I have try to use cxfreeze but when i run it i get:
>ImportError No module named PyQt4._qt
>Can you helm me to make e easy setup script.

Have you made sure the qt libraries are found by the binary?

What version of cx_freeze?

http://sourceforge.net/project/showfiles.php?group_id=84937

I'm still on python 2.5 and not with the latest version so, may be what 
follos is of no use for you.

The only problem I have is that I use "import PyQt4.Qt as qt" in my python 
programs and the version of cx_freeze I use gets confused by not adding the 
modules imported by the binary Qt module generated when building PyQt. 
Therefore, when I want to make a frozen executable, I replace the binary Qt 
module by a Qt.py module doing nothing else than:

from PyQt.QtCore import *
from PyQt.QtGui import *
and so on for all the modules I want there.

I reported that to the cx_freeze author and I guess it is included in the 
latest version, but I was so used to the 3.x.x versions that I am still 
using them. I guess I will have to upgrade when moving to 2.6

Armando  




More information about the PyQt mailing list