在raspberry pi上安装PyQt

本文档详细介绍了如何在Raspberry Pi上安装Qt开发包、SIP工具及PyQt的过程,并提供了具体的命令行指令。从安装Qt开始,接着是SIP的下载与配置,最后是PyQt的安装步骤,包括长时间的编译过程。文中还提到了一些组件在Raspberry Pi上的兼容性问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先安装Qt开发包
#$ sudo apt-get install qt4-dev-tools

下载并安装SIP(SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries. 

#$ wget  http://sourceforge.net/projects/pyqt/files/sip/sip-4.14.4/sip-4.14.4.tar.gz
#$ tar vxf sip-4.14.4.tar.gz
#$ cd sip-4.14.4
#$  python configure.py
#$ make all 
#$ sudo make install

下载安装PyQt (raspberry 性能有限,安装需要很长时间)
#$ wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10/PyQt-x11-gpl-4.10.tar.gz
#$ tar vxf PyQt-x11-gpl-4.10.tar.gz
#$ cd PyQt-x11-gpl-4.10
#$ python configure.py
#$ make all                #整个编译大约需要4个小时!
#$ sudo make install
运行demo程序
cd PyQt-x11-gpl-4.10/examples/demos/qtdemo
python qtdemo.py
简单测试了一下,部分Qt组件在raspberry pi下不能用。

转载于:https://my.oschina.net/felixliang/blog/114253

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值