3的Mavericks上的PyQt4

3的Mavericks上的PyQt4

本文介绍了带有python 3的Mavericks上的PyQt4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Xubuntu中制作了一个python应用程序,目前正在尝试在Mavericks上运行它.该项目的GUI部分使用PyQt4.我目前正在尝试在Mavericks上安装PyQt4,并在运行brew install pyqt时得到以下错误:

I have made a python application in Xubuntu that I am currently trying to run on Mavericks. The project uses PyQt4 for it's GUI portion. I am currently trying to install PyQt4 on Mavericks and get the following error when I run brew install pyqt:

Error: Qt currently requires --HEAD on Mavericks

我一直在寻找解决方案,或者这意味着什么.我以前从未见过此错误.因此,我的下一个选择是尝试手动安装.我下载了该项目,转到目录,然后运行sudo python3 configure.py,但这也没有安装,并且出现此错误:

I have looked around for a solution to this or what this evens means. I have never seen this error before. So my next option was to try and install manually instead. I downloaded the project, went to the directory, and ran sudo python3 configure.py but this does not install either and I get this error:

Error: Make sure you have a working Qt qmake on your PATH or use the -q
argument to explicitly specify a working Qt qmake.

有没有办法让Mavericks上的PyQt正常运行,以便我可以运行我的应用程序?

Is there a way to get PyQt on Mavericks to run properly so I can run my application?

推荐答案

经过大量的流血,汗水和眼泪,我整理了使用python 3:在特立独行者上安装pyqt的完整列表.

After a lot of blood, sweat and tears I have put together a full complete list of installing pyqt on mavericks using python 3:

brew install python3
brew install qt
brew install sip --with-python3
brew install pyqt --with-python3

将此添加到您的.bash_profile:

Add this to your .bash_profile:

PYTHONPATH=/usr/local/lib/python3.3/site-packages:$PYTHONPATH

重新启动计算机.

这篇关于带有python 3的Mavericks上的PyQt4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 17:25