在树莓派上安装PyQt4

安装python-qt4的脚本如下:
(1)方法一:直接安装(只安装执行程序,运行时间短,建议采用此方法)

sudo apt-get -y install python-qt4 

sudo apt-get -y install python-dev

(2)方法二:编译安装(安装原程序,编译运行时间非常长,不建议采用此方法)
#!/bin/sh
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install python-dev
sudo apt-get -y install qt4-dev-tools

echo Install SIP
cd /home/pi/download
wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.6/sip-4.16.6.tar.gz
tar -zvxf sip-4.16.6.tar.gz
cd sip-4.16.6
sudo python configure.py
sudo make
sudo make install
 
echo Istall PyQt-4.10.4
cd /hone/pi/download
wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10.4/PyQt-x11-gpl-4.10.4.tar.gz
tar -zvxf PyQt-x11-gpl-4.10.4.tar.gz
cd PyQt-x11-gpl-4.10.4
sudo python configure.py
sudo make
sudo make install
 
echo =========================================
echo QT4 and PyQT 4.10.4/SIP 4.16.6 Installed.

echo =========================================


你可能感兴趣的:(python,qt,pi,raspberry)