Я установил python3.3 x86 (официальный инсталлятор python.org) на этом окне 7 32-битPyQt4 не может импортировать QtGui, но может импортировать QtCore
затем установили PyQt4-4.10 для python3.3 Windows x86 здесь PyQt4-4.10-gpl-Py3.3-Qt5.0.1-x32-2.exe, официальный инсталлятор тоже полная установка PyQt4 (включая Qt Runtime)
Я проверил, что оба питона и PyQt4 находятся на $ PATH
но мне кажется, что я могу импортировать некоторые пакеты (например, QtCore), но не другие (например, QtGui)
, хотя они бок о бок в том же пути
>>> from PyQt4 import QtCore
>>> QtCore.__file__
'C:\\Python33\\lib\\site-packages\\PyQt4\\QtCore.pyd'
>>> from PyQt4 import QtGui
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
from PyQt4 import QtGui
ImportError: DLL load failed: The specified module could not be found.
>>> import os
>>> os.path.exists('C:\\Python33\\lib\\site-packages\\PyQt4\\QtGui.pyd')
True
>>> from PyQt4 import Qt
>>> from PyQt4 import QtXml
>>> from PyQt4 import QtNetwork
>>> from PyQt4 import QtDesigner
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
from PyQt4 import QtDesigner
ImportError: DLL load failed: The specified module could not be found.
>>> os.path.exists('C:\\Python33\\lib\\site-packages\\PyQt4\\QtDesigner.pyd')
True
работы для QtCore.pyd терпит неудачу как для QtGui.pyd и Qt5Gui.dll и производит это сообщение: «OSError: [WinError 126] Указанный модуль не может быть найден» хотя оба файла находятся в том же пути QtCore .pyd – bahaelaila7
Заранее спасибо – bahaelaila7