环境: CentOS 7.3
SIP安装
# wget http://downloads.sourceforge.net/project/pyqt/sip/sip-4.17/sip-4.17.tar.gz
# tar xvf sip-4.17.tar.gz
# cd sip-4.17
# python configure.py
# make & make install & make clean
通过安装qscintilla安装qt
yum -y install epel-release
yum install qscintilla*
pyqt4 安装
# wget http://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-4.11.4/PyQt-x11-gpl-4.11.4.tar.gz
# tar xvf PyQt-x11-gpl-4.11.4.tar.gz
# cd PyQt-x11-gpl-4.11.4
# python configure.py -q /usr/lib64/qt4/bin/qmake
# make & make install & make clean
验证安装效果
# python
Python 2.7.10 (default, Dec 7 2015, 15:42:49)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
>>> exit()