PyQt5 - python-3.2: Kein Modul verfügbar + pyuic5 kann das Modul PyQt5.uic nicht finden

5045
Emmanuel

Beim Versuch, PyQt5 zu installieren, wurde der Befehl 'make install' beendet, indem eine Warnung bezüglich des Dateiformats pyuic5 ausgegeben wurde (siehe unten).

Der Python-Pfad wird als festgelegt

PYTHONPATH=/usr/lib/python3.2/site-packages/PyQt5 

Beim Testen stehe ich vor diesen Problemen

Module nicht gefunden

help('modules') 

zeigt kein PyQt5-Modul an

Konvertierungsfehler

Versuch, eine .ui-Datei in ein Python-Modul zu konvertieren

$ pyuic5 mywindow.ui -o mywindow_ui.py 

führt in

/usr/bin/python3: No module named PyQt5.uic 

Benutzeroberfläche und eingebettete QT-Ressourcen können nicht mehr konvertiert werden (pyrcc5 schlägt als pyuic5 fehl)

Bauen

Der Build scheint erfolgreich zu sein, da der Inhalt des Verzeichnisses /usr/lib/python3.2/site-packages ist

/usr/lib/python3.2/site-packages/PyQt5$ ls __init__.py QtNetwork.so QtSql.so _QOpenGLFunctions_2_0.so QtOpenGL.so QtSvg.so QtBluetooth.so QtPositioning.so QtTest.so QtCore.so QtPrintSupport.so QtWebKit.so QtDBus.so QtQml.so QtWebKitWidgets.so QtDesigner.so QtQuick.so QtWebSockets.so QtGui.so QtQuickWidgets.so QtWidgets.so QtHelp.so QtSensors.so QtX11Extras.so QtMultimedia.so QtSerialPort.so QtXmlPatterns.so QtMultimediaWidgets.so Qt.so uic 

Gebäudeumgebung

  • Debian 7.5 (Wheezy)
  • python3.2 Standardpaket
  • SIP 4.16.1 aus Quellen
  • Qt5.3 bei ~ / Qt / 5.3 / gcc_64
  • PyQt5 aus Quellen

Sequenz erstellen

Im extrahierten PyQt5-Quellverzeichnis

$ python3 configure.py --qmake /home/jeby6372/Qt/5.3/gcc_64/bin/qmake $ make $ sudo make install 

Installationsprotokoll erstellen

make[1]: Entering directory `/home/jeby6372/pack/PyQt-gpl-5.3/pyrcc' install -m 755 -p "pyrcc5" "/usr/bin/pyrcc5" strip "/usr/bin/pyrcc5" make[1]: Leaving directory `/home/jeby6372/pack/PyQt-gpl-5.3/pyrcc' install -m 644 -p /home/jeby6372/pack/PyQt-gpl-5.3/__init__.py /usr/lib/python3.2/site-packages/PyQt5/ cp -f -R /home/jeby6372/pack/PyQt-gpl-5.3/pyuic/uic /usr/lib/python3.2/site-packages/PyQt5/ install -m 755 -p /home/jeby6372/pack/PyQt-gpl-5.3/pyuic5 /usr/bin/ strip /usr/bin/pyuic5 strip:/usr/bin/pyuic5: File format not recognized make: [install_pyuic5] Error 1 (ignored) 

Irgendeine Idee, das zu lösen?

2
PyQt5 funktioniert definitiv nicht mit Python-3.2. Ich habe herausgefunden, dass die Windows-Installation Python-3.4.0 erfordert. Durch die Installation von python-3.4.1 aus den Quellen und das Hinzufügen von /path/to/python3.4.1/lib/python3.4/site-packages zum Python-Pfad unter Linux wurde das Problem gelöst. Emmanuel vor 9 Jahren 0

1 Antwort auf die Frage

1
Dragon2fly

make: [install_pyuic5] Fehler 1 (ignoriert)

Ignoriere es einfach. Ihre Installation ist in Ordnung. Offenes Terminal:

$python >>> import PyQt5.Qt 

Wenn keine Fehlermeldung angezeigt wird, sind Sie fertig.