我正在尝试在我的Mavericks机器上安装PyQt5。
我试过这样做,在这个链接这里安装PyQt5与Python 3在OS X上
当我尝试用brew安装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.
有谁能帮我一下吗? 当您通过自制安装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