【问题标题】:PyQt5: compilation failed during installationPyQt5:安装时编译失败
【发布时间】:2015-02-16 14:01:25
【问题描述】:

我在安装 PyQt-glp-5.4 时遇到了这个问题:

cd QtCore/ && ( test -e Makefile || /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /home/thiago/Downloads/PyQt-gpl-5.4/QtCore/QtCore.pro -o Makefile ) && make -f Makefile 
make[1]: Entering directory `/home/thiago/Downloads/PyQt-gpl-5.4/QtCore'
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQItemSelectionModel.o sipQtCoreQItemSelectionModel.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQList0100QModelIndex.o sipQtCoreQList0100QModelIndex.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQRegularExpressionMatch.o sipQtCoreQRegularExpressionMatch.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQMessageLogger.o sipQtCoreQMessageLogger.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQDir.o sipQtCoreQDir.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQEvent.o sipQtCoreQEvent.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQSettings.o sipQtCoreQSettings.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQAnimationGroup.o sipQtCoreQAnimationGroup.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQSortFilterProxyModel.o sipQtCoreQSortFilterProxyModel.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQAbstractTransition.o sipQtCoreQAbstractTransition.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQIODevice.o sipQtCoreQIODevice.cpp
g++ -c -m64 -pipe -fno-exceptions -O2 -Wall -W -D_REENTRANT -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_PLUGIN -DQT_CORE_LIB -I/usr/share/qt5/mkspecs/linux-g++-64 -I. -I. -I/usr/include/python3.2mu -I../qpy/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I. -o sipQtCoreQJsonDocument.o sipQtCoreQJsonDocument.cpp
/home/thiago/Downloads/PyQt-gpl-5.4/QtCore/sipQtCoreQJsonDocument.cpp: In function ‘PyObject* meth_QJsonDocument_toJson(PyObject*, PyObject*)’:
/home/thiago/Downloads/PyQt-gpl-5.4/QtCore/sipQtCoreQJsonDocument.cpp:285:9: error: ‘JsonFormat’ is not a member of ‘QJsonDocument’
/home/thiago/Downloads/PyQt-gpl-5.4/QtCore/sipQtCoreQJsonDocument.cpp:285:35: error: expected ‘;’ before ‘a0’
/home/thiago/Downloads/PyQt-gpl-5.4/QtCore/sipQtCoreQJsonDocument.cpp:288:132: error: ‘a0’ was not declared in this scope
/home/thiago/Downloads/PyQt-gpl-5.4/QtCore/sipQtCoreQJsonDocument.cpp: At global scope:
/home/thiago/Downloads/PyQt-gpl-5.4/QtCore/sipQtCoreQJsonDocument.cpp:723:40: error: ‘Compact’ is not a member of ‘QJsonDocument’
/home/thiago/Downloads/PyQt-gpl-5.4/QtCore/sipQtCoreQJsonDocument.cpp:724:41: error: ‘Indented’ is not a member of ‘QJsonDocument’
make[1]: *** [sipQtCoreQJsonDocument.o] Error 1
make[1]: Leaving directory `/home/thiago/Downloads/PyQt-gpl-5.4/QtCore'
make: *** [sub-QtCore-make_first-ordered] Error 2

我从http://www.riverbankcomputing.com/software/pyqt/download5 获得了 PyQt5

有人知道发生了什么吗?

谢谢!!

【问题讨论】:

    标签: python-3.x ubuntu-12.04 pyqt5


    【解决方案1】:

    QJsonDocument 类中的 JsonFormat 类型是在 5.1 版中添加的,所以可能是因为您使用的是 Qt 5.0 版:

    http://doc.qt.digia.com/qt-5.0/qtcore/qjsondocument.html

    http://doc.qt.digia.com/qt-5.1/qtcore/qjsondocument.html

    【讨论】:

      猜你喜欢
      • 2012-11-23
      • 1970-01-01
      • 2014-04-23
      • 2020-10-10
      • 2014-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多