[PyQt] qtdemo.pyw doesn't run
Bruce Sass
bmsass at shaw.ca
Sun May 4 03:04:34 BST 2014
system: win7 x64
python: v3.3.2:d047928ae3f6, May 16 2013, 00:06:53 [MSC v.1600 64 bit
(AMD64)] on win32
pywin: pywin32-218.win-amd64-py3.3 installer
pyqt: PyQt5-5.2.1-gpl-Py3.3-Qt5.2.1-x64 installer
Installed in the order listed above, followed by a restart.
Running qtdemo.pyw via "PyQt Examples" in the Start Menu gets me a
PythonWin window containing an "Interactive Window" and a "qtdemo"
window containing the source of qtdemo.pyw. Running via PythonWin's
File>Run... command gets me the following Traceback:
-----
Traceback (most recent call last):
File "C:\Python33\Lib\site-packages\Pythonwin\pywin\framework
\scriptutils.py", line 326, in RunScript
exec(codeObject, __main__.__dict__)
File
"C:\Python33\Lib\site-packages\PyQt5\examples\qtdemo\qtdemo.pyw", line
46, in <module>
from PyQt5.QtCore import QEventLoop, QTime
ImportError: No module named 'PyQt5.QtCore'
-----
Searching the web for the ImportError message lead me to try the
following import statements:
from PyQt5.QtWidgets import QtCore, QApplication, QMessageBox
from PyQt5 import QtWidgets, QtCore, QApplication, QMessageBox
both resulted in pretty much the same Traceback, except the last message
changed to:
ImportError: No module named 'sip'
PyQt5 appears in Windows' PATH environment variable. There are qt.conf
files pointing to PyQt5 in the Python33 and its site-packages\PyQt5
directories, I don't know if pywin needs one also (or which dir
installed by it if it does).
I'm a win programming newbie and my last experience with py and pyqt is
way back with the early v2.x Pythons on Linux... so please be explicit
(and gentle) with your help. :)
- Bruce
More information about the PyQt
mailing list