【问题标题】:Install PyQt5 on Mavericks在 Mavericks 上安装 PyQt5
【发布时间】:2014-05-13 09:29:33
【问题描述】:

我正在尝试在我的 Mavericks 机器上安装 PyQt5。

我已尝试在此链接中这样做Installing PyQt5 with Python 3 On 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.

谁能帮我解决这个问题?

【问题讨论】:

  • 那么您是否使用了-q 标志和qmake 文件的有效路径?

标签: python pyqt qt5 pyqt5


【解决方案1】:

当您通过自制软件安装 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

【讨论】:

  • 我很想知道你为什么没有被投票,但你的信息让我走上了正轨。谢谢。
  • @jollyroger 我们需要在此处放置哪个扩展文件位置
  • @FahadUddin:不确定您要的是什么,但如果您想知道文件的位置,您必须搜索文件并将该信息传递给构建变量。跨度>
猜你喜欢
  • 2014-10-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-01-28
  • 2014-04-15
  • 1970-01-01
  • 1970-01-01
  • 2015-03-26
相关资源
最近更新 更多