[PyQt] Deploying from Linux to Windows
doug.hackworth at vanderbilt.edu
Fri Jan 16 17:53:45 GMT 2009
Greetings, everyone. Please excuse this question's elementary nature... Neither
web searching nor experimentation has yielded a solution thus far, and doubtless
someone here will be able to answer it right away.
I have developed a PyQt4 application on my Ubuntu machine, and it works fine, no
problems. Now I want another user to be able to use it on his Windows XP
machine, so on his computer I do the following, in this order:
1. Install Python 2.6
2. Install the PyQt4 for Python 2.6
Both installations were successful, and I can run the PyQt example programs that
are installed. Also I can see, in the Python installation directory, that
Lib/site-packages/PyQt4 exists and has appropriate-looking stuff in it.
And yet -- I bet you can see this coming -- I cannot get my application to
execute. Doubleclicking on my_app.py produces an instantaneously visible DOS
shell and no application, and renaming the file to my_app.pyw also has no effect
(less the flashing DOS shell). Entering a DOS shell and trying to run the
program from there by means of a "python my_app.py" command simply results in:
Traceback (most recent call last):
File "my_app.py", line 2, in <module>
from PyQt4 import QtCore, QtGui
ImportError: No module named PyQt4
So is this merely an issue of an undefined PYTHONPATH variable, or similar? I
was expecting that things in Lib/site-packages would be automatically visible to
Python... Is this not the case?
I'm sure I'm missing something very simple. Thoughts?
More information about the PyQt