WinchellChung
4th August 2007, 20:51
I have a simplistic "hello world" program using PyQt4 GPL ("test.py").
It runs fine when invoked from Python.
I make an executable utilizing Py2exe (http://www.py2exe.org/).
But when I try running the executable, it gives the following error:
Traceback (most recent call last):
File "test.py", line 2, in <module>
File "PyQt4\QtCore.pyc", line 12, in <module>
File "PyQt4\QtCore.pyc", line 10, in __load
ImportError: No module named _qt
I'm sure I'm making a simplistic amateur mistake somewhere.
I am using Window XP personal edition,
Python 2.5,
PyQt v4 GPL for Windows and Python v2.5
(PyQt-Py2.5-gpl-4.3.0-b1.exe),
Sip 4.7,
and Py2Exe 0.6.6
(py2exe-0.6.6.win32-py2.5.exe)
My Py2Exe setup script is:
from distutils.core import setup
import py2exe
setup(windows=[{"script":"test.py"}], options={"py2exe":{"includes":["sip"]}})
My application consists of two modules, the main is in
test.py, the rest is in test_ui.py
I invoke Py2Exe with the following line in the Windows Command Prompt:
c:\Python25\python setup.py py2exe
when in the directory containing test.py
In the Py2Exe script, I've tried replacing "sip" with "PyQt4",
which seems to have no effect.
Neither does changing the Py2exe setup script to
setup(console=['test.py'])
and invoking it with
c:\Python25\python setup.py py2exe --include sip
Does anybody have any idea what I am doing wrong?
It runs fine when invoked from Python.
I make an executable utilizing Py2exe (http://www.py2exe.org/).
But when I try running the executable, it gives the following error:
Traceback (most recent call last):
File "test.py", line 2, in <module>
File "PyQt4\QtCore.pyc", line 12, in <module>
File "PyQt4\QtCore.pyc", line 10, in __load
ImportError: No module named _qt
I'm sure I'm making a simplistic amateur mistake somewhere.
I am using Window XP personal edition,
Python 2.5,
PyQt v4 GPL for Windows and Python v2.5
(PyQt-Py2.5-gpl-4.3.0-b1.exe),
Sip 4.7,
and Py2Exe 0.6.6
(py2exe-0.6.6.win32-py2.5.exe)
My Py2Exe setup script is:
from distutils.core import setup
import py2exe
setup(windows=[{"script":"test.py"}], options={"py2exe":{"includes":["sip"]}})
My application consists of two modules, the main is in
test.py, the rest is in test_ui.py
I invoke Py2Exe with the following line in the Windows Command Prompt:
c:\Python25\python setup.py py2exe
when in the directory containing test.py
In the Py2Exe script, I've tried replacing "sip" with "PyQt4",
which seems to have no effect.
Neither does changing the Py2exe setup script to
setup(console=['test.py'])
and invoking it with
c:\Python25\python setup.py py2exe --include sip
Does anybody have any idea what I am doing wrong?