【问题标题】:Installing PyQt5 (incl. Qt Designer) on macOS (Sierra)在 macOS (Sierra) 上安装 PyQt5(包括 Qt Designer)
【发布时间】:2018-03-14 12:24:30
【问题描述】:

谁能解释(或指向我的说明)如何安装 PyQt5 for macOS (Python 3.6),包括 QT Designer 应用程序

过去几天我一直在互联网上搜索,但无法安装它。

我尝试过手动安装,但卡在--qmake 上,我尝试过pip install PyQt5,但这没有 Qt 设计器。

编辑:

这不是 previous question 的重复,上一个问题涉及 a) windows 操作系统和 b) 提供使用 pip install pyqt5-tools 的解决方案,该解决方案不适用于 macOS

【问题讨论】:

  • 您提供的链接使用pip install pyqt5-tools。我试过这个并得到Could not find a version that satisfies the requirement pyqt5-tools (from versions: ) No matching distribution found for pyqt5-tools
  • 我刚刚用同样的方法成功安装了。
  • 在 Mac 上?!!为什么我的似乎找不到任何东西......
  • 在电脑上。所以这可能是 mac 的一个特定错误。
  • 啊!是的,我使用相同的方法将它安装在我的工作 PC 上,但现在正在尝试使用 mac。找不到任何有用的东西...

标签: python macos python-3.x pyqt


【解决方案1】:

QT Designer 是一个使用 PyQt 小部件的独立工具。它不包含在 PyQt5 框架中,这就是为什么你找不到它附带的 PyQt5 库的原因。为了获得它,您必须将 Qt Designer 与 PyQt 安装分开安装。

安装 PyQt5 后,像这样安装 PyQt5Designer: 点安装 PyQt5Designer

如果 pip 不适合你,我建议尝试其他包管理器,例如:

如果这些包管理器都不起作用,请尝试通过此链接的独立安装程序:https://build-system.fman.io/qt-designer-download

希望这会有所帮助。

【讨论】:

    【解决方案2】:

    我使用了brew install Qt5,然后open -a Designer 将启动Qt Designer。之后我用pip install pyqt5安装了PyQt5。

    【讨论】:

      猜你喜欢
      • 2017-06-22
      • 1970-01-01
      • 2017-05-05
      • 1970-01-01
      • 1970-01-01
      • 2018-03-05
      • 2018-12-05
      • 2017-05-30
      • 1970-01-01
      相关资源
      最近更新 更多