简体   繁体   English

使用Python 3安装PyQt4-错误

[英]Installing PyQt4 with Python 3 - error

I followed instructions to download and install sip and pyqt4 here 我按照说明在此处下载和安装sip和pyqt4

http://ubuntuforums.org/showthread.php?t=1777613 http://ubuntuforums.org/showthread.php?t=1777613

I have PyQt4 via aptitude working for my Python 2.7 installation; 我通过aptitude拥有PyQt4,可用于我的Python 2.7安装; to get it to work for Python 3, when i run sudo make, i get the following messsage: 为了使其适用于Python 3,当我运行sudo make时,我得到以下消息:

    make[1]: Entering directory `/home/usman/programs/PyQt-x11-gpl-4.10/QtCore'
g++ -c -m64 -pipe -fPIC -O2 -Wall -W -D_REENTRANT -DNDEBUG -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/home/usman/programs/PyQt-x11-gpl-4.10/qpy/QtCore -I/usr/include/python3.2mu -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -o sipQtCorecmodule.o sipQtCorecmodule.cpp
/home/usman/programs/PyQt-x11-gpl-4.10/QtCore/sipQtCorecmodule.cpp:9883:1: error: braces around scalar initialiser for type ‘sipSubClassConvertorDef* {aka _sipSubClassConvertorDef*}’
make[1]: *** [sipQtCorecmodule.o] Error 1
make[1]: Leaving directory `/home/usman/programs/PyQt-x11-gpl-4.10/QtCore'
make: *** [all] Error 2

Does anyone know the solution? 有人知道解决方案吗? Thanks 谢谢

You need to do sudo make . 您需要执行sudo make Once you do it, you should be able to compile the source. 完成后,您应该能够编译源代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM