【问题标题】:PyQt: error with converting to Qt Designer UI file to Python modulePyQt:将 Qt Designer UI 文件转换为 Python 模块时出错
【发布时间】:2017-07-01 17:29:45
【问题描述】:

当我尝试使用此命令将ui 文件转换为py 时:

pyuic4 -o test.ui test.py

它给出了这个错误:

【问题讨论】:

  • 你的python和pyqt系统安装肯定有冲突。例如,您安装了 Python 3.4 (x64) 并安装了 PyQt (x86),反之亦然。您能否提供有关您正在使用的版本的更多详细信息?
  • 我怎样才能给你看版本?
  • 打开cmd.exepython 然后import platform 然后platform.platform() 并复制输出。另外你是如何安装 PyQt 的?你使用二进制文件还是 pip ?
  • 'Windows-8-6.2.9200' 继承了该平台,我也是从我找到的 exe 安装的
  • 我们将继续聊天:chat.stackoverflow.com/rooms/135620/…

标签: python pyqt pyqt4 qt-designer pyuic


【解决方案1】:

这个错误很常见,基本上是说要让Python和PyQt正常工作,系统版本需要匹配。

例如:如果你有 Python 3.4 (x86) 你将需要 PyQt (x86)

PyQt4/PyQt5 x86/x64 的 Windows 二进制文件可在 SourceForge 存储库中找到:https://sourceforge.net/projects/pyqt/files/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-28
    • 1970-01-01
    • 2017-09-05
    • 2012-12-14
    • 2017-02-10
    • 2012-11-13
    • 2021-06-11
    • 1970-01-01
    相关资源
    最近更新 更多