1

I am facing the same problem as here: Installing PyQt 4.9 on CentOS 6.0 Fails .

I am trying to install (make) pyqt v4.9 using python v3.1 on a linux machine running Ubuntu 10.04.

From the "riverbank" website I downloaded and installed SIP, which seemed to go well.Then I downloaded PyQt-x11-gpl-4.9.tar.gz, extracted the files, and entered the directory.

Now, typing "python3 configure.py -w --confirm-license" produced the following output:

Determining the layout of your Qt installation...
/usr/bin/qmake -o qtdirs.mk qtdirs.pro
make -f qtdirs.mk
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -
I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/q
t4 -I. -o qtdirs.o qtdirs.cpp
g++ -Wl,-O1 -o qtdirs qtdirs.o    -L/usr/lib -lQtCore -lpthread 
./qtdirs
This is the GPL version of PyQt 4.9 (licensed under the GNU General Public
License) for Python 3.1.2 on linux2.
Found the license file pyqt-gpl.sip.
Checking to see if the QtGui module should be built...
g++ -DQT_NO_DEBUG -DQT_GUI_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/Q
tGui -I/usr/include/qt4 -I/usr/X11R6/include -pipe -O2 -fno-optimize-sibling-cal
ls -w -D_REENTRANT cfgtest_QtGui.cpp -o cfgtest_QtGui -L/usr/lib -L/usr/X11R6/li
b -Wl,-O1 -Wl,-rpath,/usr/lib -lQtGui -lXext -lX11 -lm -lpthread
Checking to see if the QtHelp module should be built...
g++ -DQT_NO_DEBUG -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtHelp -I/usr/
include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_QtHelp
.cpp -o cfgtest_QtHelp -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQtHelp -lpthread

Checking to see if the QtMultimedia module should be built...
g++ -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/includ
e/qt4/QtMultimedia -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -
D_REENTRANT cfgtest_QtMultimedia.cpp -o cfgtest_QtMultimedia -L/usr/lib -Wl,-O1 
-Wl,-rpath,/usr/lib -lQtMultimedia -lpthread
Checking to see if the QtNetwork module should be built...
g++ -DQT_NO_DEBUG -DQT_NETWORK_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/q
t4/QtNetwork -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REEN
TRANT cfgtest_QtNetwork.cpp -o cfgtest_QtNetwork -L/usr/lib -Wl,-O1 -Wl,-rpath,/
usr/lib -lQtNetwork -lpthread
Checking to see if the QtDBus module should be built...
g++ -DQT_NO_DEBUG -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtDBus -I/usr/
include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_QtDBus
.cpp -o cfgtest_QtDBus -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQtDBus -lpthread

Checking to see if the QtDeclarative module should be built...
g++ -DQT_NO_DEBUG -DQT_DECLARATIVE_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/inclu
de/qt4/QtDeclarative -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w
 -D_REENTRANT cfgtest_QtDeclarative.cpp -o cfgtest_QtDeclarative -L/usr/lib -Wl,
-O1 -Wl,-rpath,/usr/lib -lQtDeclarative -lpthread
cfgtest_QtDeclarative.cpp:1:30: error: qdeclarativeview.h: Datei oder Verzeichni
s nicht gefunden
cfgtest_QtDeclarative.cpp: In function ‘int main(int, char**)’:
cfgtest_QtDeclarative.cpp:5: error: expected type-specifier before ‘QDeclarative
View’
cfgtest_QtDeclarative.cpp:5: error: expected ‘;’ before ‘QDeclarativeView’
Checking to see if the QtOpenGL module should be built...
g++ -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_CORE_LIB -I. -I/usr/mkspecs/linux-g++ -I/
usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I/usr/X11
R6/include -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_QtOpenG
L.cpp -o cfgtest_QtOpenGL -L/usr/lib -L/usr/X11R6/lib -Wl,-O1 -Wl,-rpath,/usr/li
b -lQtOpenGL -lQtCore -lGLU -lGL -lXext -lX11 -lm -lpthread
Checking to see if the QtScript module should be built...
g++ -DQT_NO_DEBUG -DQT_SCRIPT_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt
4/QtScript -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTR
ANT cfgtest_QtScript.cpp -o cfgtest_QtScript -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/
lib -lQtScript -lpthread
Checking to see if the QtScriptTools module should be built...
g++ -DQT_NO_DEBUG -DQT_SCRIPTTOOLS_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/inclu
de/qt4/QtScriptTools -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w
 -D_REENTRANT cfgtest_QtScriptTools.cpp -o cfgtest_QtScriptTools -L/usr/lib -Wl,
-O1 -Wl,-rpath,/usr/lib -lQtScriptTools -lpthread
Checking to see if the QtSql module should be built...
g++ -DQT_NO_DEBUG -DQT_SQL_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/Q
tSql -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I/usr/X11R6/include -pipe -O2 
-fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_QtSql.cpp -o cfgtest_QtSql -
L/usr/lib -L/usr/X11R6/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQtSql -lQtGui -lXext -l
X11 -lm -lpthread
Checking to see if the QtSvg module should be built...
g++ -DQT_NO_DEBUG -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtSvg -I/usr/i
nclude/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_QtSvg.c
pp -o cfgtest_QtSvg -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQtSvg -lpthread
Checking to see if the QtTest module should be built...
g++ -DQT_NO_DEBUG -DQT_TEST_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/
QtTest -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT 
cfgtest_QtTest.cpp -o cfgtest_QtTest -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQt
Test -lpthread
Checking to see if the QtWebKit module should be built...
g++ -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_CORE_LIB -I. -I/usr/mkspecs/linux-g++ -I/
usr/include/qt4/QtWebKit -I/usr/include/qt4/QtCore -I/usr/include/qt4 -pipe -O2 
-fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_QtWebKit.cpp -o cfgtest_QtWe
bKit -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQtWebKit -lQtCore -lpthread
Checking to see if the QtXml module should be built...
g++ -DQT_NO_DEBUG -DQT_XML_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/Q
tXml -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT cf
gtest_QtXml.cpp -o cfgtest_QtXml -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQtXml 
-lpthread
Checking to see if the QtXmlPatterns module should be built...
g++ -DQT_NO_DEBUG -DQT_XMLPATTERNS_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/inclu
de/qt4/QtXmlPatterns -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w
 -D_REENTRANT cfgtest_QtXmlPatterns.cpp -o cfgtest_QtXmlPatterns -L/usr/lib -Wl,
-O1 -Wl,-rpath,/usr/lib -lQtXmlPatterns -lpthread
Checking to see if the phonon module should be built...
g++ -DQT_NO_DEBUG -DQT_PHONON_LIB -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt
4/phonon -I/usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRAN
T cfgtest_phonon.cpp -o cfgtest_phonon -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -l
phonon -lpthread
cfgtest_phonon.cpp:1:32: error: phonon/videowidget.h: Datei oder Verzeichnis nic
ht gefunden
cfgtest_phonon.cpp: In function ‘int main(int, char**)’:
cfgtest_phonon.cpp:5: error: expected type-specifier before ‘Phonon’
cfgtest_phonon.cpp:5: error: expected ‘;’ before ‘Phonon’
Checking to see if the QtAssistant module should be built...
g++ -DQT_NO_DEBUG -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtAssistant -I
/usr/include/qt4/QtGui -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/X1
1R6/include -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_QtAssi
stant.cpp -o cfgtest_QtAssistant -L/usr/lib -L/usr/X11R6/lib -Wl,-O1 -Wl,-rpath,
/usr/lib -lQtAssistantClient -lQtGui -lQtNetwork -lXext -lX11 -lm -lpthread
Checking to see if the QtDesigner module should be built...
g++ -DQT_NO_DEBUG -I. -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtDesigner -I/
usr/include/qt4 -pipe -O2 -fno-optimize-sibling-calls -w -D_REENTRANT cfgtest_Qt
Designer.cpp -o cfgtest_QtDesigner -L/usr/lib -Wl,-O1 -Wl,-rpath,/usr/lib -lQtDe
signer -lpthread
Checking to see if the dbus support module should be built...
The Python dbus module doesn't seem to be installed.
Qt v4.6.2 free edition is being used.
SIP 4.13.1 is being used.
The Qt header files are in /usr/include/qt4.
The shared Qt libraries are in /usr/lib.
The Qt binaries are in /usr/bin.
The Qt mkspecs directory is in /usr/share/qt4.
These PyQt modules will be built: QtCore, QtGui, QtHelp, QtMultimedia,
QtNetwork, QtDBus, QtOpenGL, QtScript, QtScriptTools, QtSql, QtSvg, QtTest,
QtWebKit, QtXml, QtXmlPatterns, QtAssistant, QtDesigner.
The PyQt Python package will be installed in /usr/lib/python3.1/dist-packages.
PyQt is being built with generated docstrings.
PyQt is being built with 'protected' redefined as 'public'.
The Designer plugin will be installed in /usr/lib/qt4/plugins/designer.
The PyQt .sip files will be installed in /usr/share/sip/PyQt4.
pyuic4, pyrcc4 and pylupdate4 will be installed in /usr/bin.
Generating the C++ source for the QtCore module...
"/usr/bin/sip" -w -o -P -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_6_
2 -g -a QtCore.api -c /home/jonathan/Downloads/PyQt-x11-gpl-4.9/QtCore -b QtCore
/QtCore.sbf -I /home/jonathan/Downloads/PyQt-x11-gpl-4.9/sip /home/jonathan/Down
loads/PyQt-x11-gpl-4.9/sip/QtCore/QtCoremod.sip
Creating the Makefile for the QtCore module...
Generating the C++ source for the QtGui module...
"/usr/bin/sip" -w -o -P -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_6_
2 -g -a QtGui.api -c /home/jonathan/Downloads/PyQt-x11-gpl-4.9/QtGui -b QtGui/Qt
Gui.sbf -I /home/jonathan/Downloads/PyQt-x11-gpl-4.9/sip /home/jonathan/Download
s/PyQt-x11-gpl-4.9/sip/QtGui/QtGuimod.sip
Creating the Makefile for the QtGui module...
Generating the C++ source for the QtHelp module...
"/usr/bin/sip" -w -o -P -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_6_
2 -g -a QtHelp.api -c /home/jonathan/Downloads/PyQt-x11-gpl-4.9/QtHelp -b QtHelp
/QtHelp.sbf -I /home/jonathan/Downloads/PyQt-x11-gpl-4.9/sip /home/jonathan/Down
loads/PyQt-x11-gpl-4.9/sip/QtHelp/QtHelpmod.sip
Creating the Makefile for the QtHelp module...
Generating the C++ source for the QtMultimedia module...
"/usr/bin/sip" -w -o -P -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_6_
2 -g -a QtMultimedia.api -c /home/jonathan/Downloads/PyQt-x11-gpl-4.9/QtMultimed
ia -b QtMultimedia/QtMultimedia.sbf -I /home/jonathan/Downloads/PyQt-x11-gpl-4.9
/sip /home/jonathan/Downloads/PyQt-x11-gpl-4.9/sip/QtMultimedia/QtMultimediamod.
sip
Creating the Makefile for the QtMultimedia module...
Generating the C++ source for the QtNetwork module...
"/usr/bin/sip" -w -o -P -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_6_
2 -g -a QtNetwork.api -c /home/jonathan/Downloads/PyQt-x11-gpl-4.9/QtNetwork -b 
QtNetwork/QtNetwork.sbf -I /home/jonathan/Downloads/PyQt-x11-gpl-4.9/sip /home/j
onathan/Downloads/PyQt-x11-gpl-4.9/sip/QtNetwork/QtNetworkmod.sip
Creating the Makefile for the QtNetwork module...
Generating the C++ source for the QtDBus module...
"/usr/bin/sip" -w -o -P -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_6_
2 -g -a QtDBus.api -c /home/jonathan/Downloads/PyQt-x11-gpl-4.9/QtDBus -b QtDBus
/QtDBus.sbf -I /home/jonathan/Downloads/PyQt-x11-gpl-4.9/sip /home/jonathan/Down
loads/PyQt-x11-gpl-4.9/sip/QtDBus/QtDBusmod.sip
sip: QDBusPendingCall has not been defined
Error: Unable to create the C++ code.

I would really appreciate any help getting pyqt4 to work with python3.

Thank you.

Community
  • 1
  • 1
presencia
  • 11
  • 2
  • maybe this will help: http://stackoverflow.com/questions/7942887/how-to-configure-pyqt4-for-python-3-in-ubuntu – warvariuc Jan 02 '12 at 11:14
  • 1
    According to [this answer](http://stackoverflow.com/a/8753905/984421), you may need to upgrade to Qt 4.7 or Qt 4.8. – ekhumoro Jan 06 '12 at 18:29

0 Answers0