在Mavericks上安装PyQt5

Mir*_*bic 2 python pyqt qt5 pyqt5

我正在尝试在我的小牛机器上安装PyQt5.

我试着这样做就像在这里链接一样在OS X上安装PyQt5和Python 3

当我尝试用brew安装qt5时,会出现一个警告:

qt5-5.2.1 already installed
Run Code Online (Sandbox Code Playgroud)

但是当我打字的时候 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.
Run Code Online (Sandbox Code Playgroud)

有人可以帮我这个吗?

小智 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
Run Code Online (Sandbox Code Playgroud)

尽管这些信息是非常有用的,你是专门寻找将是在一个目录下/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