2013-03-29 21 views
6

I python3.3 x86 (offizieller python.org Installer) auf dieser Windows 7 32-Bit-PyQt4 kann nicht QtGui importieren kann aber QtCore importieren

dann installiert PyQt4-4.10 für python3.3 Fenster x86 von hier PyQt4-4.10-gpl-Py3.3-Qt5.0.1-x32-2.exe installiert, auch ein offizieller Installateur, eine vollständige PyQt4 Installation (einschließlich Qt Runtime)

ich doppelt überprüft, dass beide python und PyQt4 auf $ PATH sind

aber es scheint, dass ich einige Pakete importieren können (zB QtCore), andere aber nicht (z. B. QtGui)

, obwohl sie sind nebeneinander in dem gleichen Pfad

>>> 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 
+0

Werke für QtCore.pyd nicht für beide QtGui.pyd und Qt5Gui.dll und produziert diese Meldung: : obwohl beide Dateien sind im selben Pfad von QtCore „OSError [WinError 126] Das angegebene Modul konnte nicht gefunden werden“ .pyd – bahaelaila7

+0

Vielen Dank im Voraus – bahaelaila7

Antwort

1

Wenn Sie nicht wie die ganze DirectX installieren Sie tun können, die folgenden:

Erster Download von Directx verteilbar: http://www.microsoft.com/en-us/download/details.aspx?id=8109 (das ist eine Art von selbstextrahier MS-Cabinet-Datei)

dann in Linux zum Beispiel (Debian basiert - sollte auf anderen Distributionen ähnlich funktionieren):

sudo apt-get install cabextract 
mkdir cabs 
cabextract -d cabs -F JUN2010\* directx_Jun2010_redist.exe 
cd cabs 
mkdir x64 
cabextract -d x64 -F \*.dll *_x64.cab 

in Windows können Sie cab-Dateien zum Beispiel mit Winrar extrahieren. Einige Windows-Versionen enthalten ein Befehlszeilen-Dienstprogramm für cab-Dateien - ich glaube, es hieß extract.