Probleme mit Gebäude PyQt5 auf Ubuntu 14.04

Ich bin mit einigen Problemen Gebäudes PyQt5 auf Ubuntu 14.04. Ich arbeite mit einigen code, der hat eine harte Abhängigkeit auf Python 2.7; also, ich bin nicht in der Lage zu verwenden die Python ist3 Pakete aus dem Ubuntu repository. Weiter sucht der Ubuntu-Pakete zeigen, dass es dev und doc-Pakete für Python 2 pyqt5. Aber, nichts zu installieren, die Bibliotheken notwendig, um code zu schreiben.

Dies führte mich zu erstellen, eine custom bauen PyQt5. Ich erhielt die Quelle für die version 5.5 von hier: https://www.riverbankcomputing.com/software/pyqt/download5 und ich bin die sip verwenden, wie es von den Ubuntu-repos (installation von kubuntu-desktop erfordert sip).

Habe ich gelesen, dass es einfach zu haben, nicht übereinstimmende Versionen von sip, so habe ich Folgendes überprüfen:

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sip
>>> print(sip, sip.SIP_VERSION_STR)
(<module 'sip' from '/usr/lib/python2.7/dist-packages/sip.so'>, '4.16.9')

Und:

$ sip -V
4.16.9

Auch ich bin mit dem Qt5-tools zur Verfügung gestellt, die von den Ubuntu-repos. Dies umfasste die Installation qtdeclarative5-* (wahrscheinlich übertrieben) und qt5-default. Hier finden Sie einige Informationen über qmake:

qmake --version
QMake version 3.0
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu

Momentan habe ich PyQt4 installiert, und Lesen Sie die Installationshinweise, dies wäre in Ordnung, solange Sie beide waren zusammengestellt, mit der gleichen version von sip.

Nach dem Download habe ich entpackt den tarball und versucht ein zu bauen, wie folgt:

sudo ln -s  /usr/include/python2.7  /usr/local/include/python2.7
python configure.py --sip-incdir=/usr/include/python2.7/
make

Konfiguration Ausgabe erschien zu identifizieren, die richtige version der sip-und ich bekomme die folgende (scheinbar) sip-bezogene Fehler bei der Kompilierung aus:

make[1]: Entering directory `~/Downloads/PyQt-gpl-5.5/QtWebKit'
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WEBKIT_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python2.7 -I/usr/include/qt5 -I/usr/include/qt5/QtWebKit -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtCore -I. -o sipQtWebKitQWebSecurityOrigin.o sipQtWebKitQWebSecurityOrigin.cpp
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp: In function ‘PyObject* meth_QWebSecurityOrigin_addAccessWhitelistEntry(PyObject*, PyObject*)’:
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:384:9: error: ‘SubdomainSetting’ is not a member of ‘QWebSecurityOrigin’
         QWebSecurityOrigin::SubdomainSetting a2;
         ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:384:46: error: expected ‘;’ before ‘a2’
         QWebSecurityOrigin::SubdomainSetting a2;
                                              ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:387:214: error: ‘a2’ was not declared in this scope
         if (sipParseArgs(&sipParseErr, sipArgs, "BJ1J1E", &sipSelf, sipType_QWebSecurityOrigin, &sipCpp, sipType_QString,&a0, &a0State, sipType_QString,&a1, &a1State, sipType_QWebSecurityOrigin_SubdomainSetting, &a2))
                                                                                                                                                                                                                      ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:389:21: error: ‘class QWebSecurityOrigin’ has no member named ‘addAccessWhitelistEntry’
             sipCpp->addAccessWhitelistEntry(*a0,*a1,a2);
                     ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp: In function ‘PyObject* meth_QWebSecurityOrigin_removeAccessWhitelistEntry(PyObject*, PyObject*)’:
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:417:9: error: ‘SubdomainSetting’ is not a member of ‘QWebSecurityOrigin’
         QWebSecurityOrigin::SubdomainSetting a2;
         ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:417:46: error: expected ‘;’ before ‘a2’
         QWebSecurityOrigin::SubdomainSetting a2;
                                              ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:420:214: error: ‘a2’ was not declared in this scope
         if (sipParseArgs(&sipParseErr, sipArgs, "BJ1J1E", &sipSelf, sipType_QWebSecurityOrigin, &sipCpp, sipType_QString,&a0, &a0State, sipType_QString,&a1, &a1State, sipType_QWebSecurityOrigin_SubdomainSetting, &a2))
                                                                                                                                                                                                                      ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:422:21: error: ‘class QWebSecurityOrigin’ has no member named ‘removeAccessWhitelistEntry’
             sipCpp->removeAccessWhitelistEntry(*a0,*a1,a2);
                     ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp: In function ‘void* init_type_QWebSecurityOrigin(sipSimpleWrapper*, PyObject*, PyObject*, PyObject**, PyObject**, PyObject**)’:
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:477:48: error: no matching function for call to ‘QWebSecurityOrigin::QWebSecurityOrigin(const QUrl&)’
             sipCpp = new QWebSecurityOrigin(*a0);
                                                ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:477:48: note: candidates are:
In file included from ~/Downloads/PyQt-gpl-5.5/sip/QtWebKit/qwebsecurityorigin.sip:26:0:
/usr/include/qt5/QtWebKit/qwebsecurityorigin.h:64:5: note: QWebSecurityOrigin::QWebSecurityOrigin(QWebSecurityOriginPrivate*)
     QWebSecurityOrigin(QWebSecurityOriginPrivate* priv);
     ^
/usr/include/qt5/QtWebKit/qwebsecurityorigin.h:64:5: note:   no known conversion for argument 1 from ‘const QUrl’ to ‘QWebSecurityOriginPrivate*’
/usr/include/qt5/QtWebKit/qwebsecurityorigin.h:58:5: note: QWebSecurityOrigin::QWebSecurityOrigin(const QWebSecurityOrigin&)
     QWebSecurityOrigin(const QWebSecurityOrigin& other);
     ^
/usr/include/qt5/QtWebKit/qwebsecurityorigin.h:58:5: note:   no known conversion for argument 1 from ‘const QUrl’ to ‘const QWebSecurityOrigin&’
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp: At global scope:
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:516:48: error: ‘AllowSubdomains’ is not a member of ‘QWebSecurityOrigin’
     {sipName_AllowSubdomains, static_cast<int>(QWebSecurityOrigin::AllowSubdomains), 21},
                                                ^
~/Downloads/PyQt-gpl-5.5/QtWebKit/sipQtWebKitQWebSecurityOrigin.cpp:517:51: error: ‘DisallowSubdomains’ is not a member of ‘QWebSecurityOrigin’
     {sipName_DisallowSubdomains, static_cast<int>(QWebSecurityOrigin::DisallowSubdomains), 21},
                                                   ^
make[1]: *** [sipQtWebKitQWebSecurityOrigin.o] Error 1
make[1]: Leaving directory `~/Downloads/PyQt-gpl-5.5/QtWebKit'
make: *** [sub-QtWebKit-make_first-ordered] Error 2

Das Ergebnis ist, dass ich make install und Holen Sie sich einige der Funktionen an, die ich erwarten würde; jedoch, ich bin fehlen einige erforderliche Funktionalität mit der WebKit-widgets. Ich hoffe, dass ich genug Informationen geliefert, um zu beschreiben, wo ich stecken geblieben bin. Ich fühle mich einfach nur schüchtern Graben in den code, aber ich gehe davon aus, dass die Antwort ist eigentlich viel einfacher.

Vielen Dank im Voraus!

InformationsquelleAutor Joseph | 2015-08-18
Schreibe einen Kommentar