2014-05-13 232 views
2

我正试图在我的小牛机上安装PyQt5。在小牛上安装PyQt5

我试图做到像在这里这个链接Installing PyQt5 with Python 3 On OS X

当我尝试安装与酿造QT5,总会有一个警告:

qt5-5.2.1 already installed 

但是当我键入python configure.py

终端说:

querying qmake about your Qt installation... Error: PyQt5 requires Qt 
v5.0 or later. You seem to be using v4.8.6. Use the 
--qmake flag to specify the correct version of quake. 

Ca任何人都可以帮助我吗?

+0

那么你是否使用了'qq标志和'qmake'文件的有效路径? – ChrisW

回答

10

当您通过自制软件Qt安装,您应该已经收到了类似的警告:

This formula is keg-only, so it was not symlinked into /usr/local. 

Qt 5 conflicts Qt 4 (which is currently much more widely used). 

Generally there are no consequences of this for you. If you build your 
own software and it requires this formula, you'll need to add to your 
build variables: 

    LDFLAGS: -L/usr/local/opt/qt5/lib 
    CPPFLAGS: -I/usr/local/opt/qt5/include 

虽然这个信息是非常有帮助的,你是专门寻找将在一个目录下/usr/local/opt/qt5/$VERSION_OF_QT/bin/作为qmake是一个二进制工具。

对我而言,qmake位于/usr/local/Cellar/qt5/5.3.1/bin/qmake。走这条路,把它送到你的--configure开关,你就会全部设置!

例如python configure.py --qmake /usr/local/Cellar/qt5/5.3.1/bin/qmake

+0

我很想知道你为什么没有投票,但是你的信息让我走上了正确的轨道。谢谢。 – jollyroger

+0

@jollyroger欢呼:) –

+0

@jollyroger究竟是我们需要放在哪里的扩展文件位置 – Fahadkalis