下面是我的安装情况:
我的系统是Mac OS X 10.6.3,64位的,我在这里先将64位转为32位的操作系统,在命令行下输入:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
,回车。
转化后,系统需要重新启动,重启后,你可以在这里看到。这是系统就是32位内核的。
http://hi.csdn.net/attachment/201102/15/0_1297760592ZGOX.gif
要安装pyqt的python版本是 2.6.1
安装PtQt4前你需准备:
创建了一个pyqt文件夹在硬盘根目录下,并将sip-4.12.1.tar.gz和PyQt-mac-gpl-snapshot-4.8.4.tar.gz
放到其中并解压。
1。先安装qt,默认安装,这一步大部分人不会有问题,跳过。
2。接下来,打开终端(Terminal,在 Applications(应用程序)/Utilities(实用工具)/ 下),在终端输入:export VERSIONER_PYTHON_PREFER_32_BIT=yes。
3.
使用"cd 路径"命令将当前目录设为sip-4.12.1,如: cd /pyqt/sip-4.12.1/, 然后进行配置(configure)【Re-build SIP in 32bit 】在终端中执行
配置(configure)完成后就开始编译,在终端中执行
编译完成后就安装,在终端中执行
在这个过程中没出现错误就是安装成功了
编译安装PyQt4,过程和上面的一样。 【Build PyQt4 in 32bit 】
在终端中使用"cd 路径"命令将当前目录设为PyQt-mac-gpl-snapshot-4.8.4,如
然后进行配置(configure),在终端中执行
配置时会遇到
This is the GPL version of PyQt 4.6 (licensed under the GNU General Public
License) for Python 2.6.2 on darwin.
Type '2' to view the GPL v2 license.
Type '3' to view the GPL v3 license.
Type 'yes' to accept the terms of the license.
Type 'no' to decline the terms of the license.
Do you accept the terms of the license?
输入yes,再按回车就行
配置(configure)完成后就开始编译,在终端中执行
编译比较花时间,请耐心等待。
编译完成后就安装,在终端中执行
在这个过程中没出现错误就是安装成功了
也可以在IDLE中导入PyQt4的模块,能成功导入就说明安装成功