【问题标题】:Error while installing PyQt5: const class QJsonValue’ has no member named ‘toInt’安装 PyQt5 时出错:const class QJsonValue' has no member named 'toInt'
【发布时间】:2016-05-14 06:30:29
【问题描述】:

我正在尝试安装 PyQt5,但出现此错误,我阅读了一些与此错误相关的其他帖子,但没有任何帮助。

/home/pathname/Downloads/PyQt-gpl-5.5.1/QtCore/sipQtCoreQJsonValue.cpp:367:30: error: ‘const class QJsonValue’ has no member named ‘toInt’
             sipRes = sipCpp->toInt(a0);
                              ^
make[1]: *** [sipQtCoreQJsonValue.o] Error 1
make[1]: Leaving directory `/home/pathname/Downloads/PyQt-gpl-5.5.1/QtCore'
make: *** [sub-QtCore-make_first-ordered] Error 2

我在我的主文件夹中安装了 Qt5,当我安装 python configure.py 时,我将 qmake 包含到 Qt5 所在的路径中,并且没有问题。但是使用make 命令我得到了那个错误。

【问题讨论】:

  • 您确定可用于 make 系统的 Qt 版本是您正在构建的 PyQt 的正确版本吗?
  • 非常感谢您的帮助,我的 Qt 版本比 PyQt 旧,所以我只需要获取新的 Qt 版本,现在一切都已正确安装。谢谢!
  • 啊太好了,我把它变成了一个答案,所以你可以关闭这个问题。

标签: python c++ pyqt qt5 pyqt5


【解决方案1】:

您对 make 系统可用的 Qt 版本必须与您正在构建的 PyQt 版本不兼容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-11-25
    • 2018-08-26
    • 1970-01-01
    • 2015-11-24
    • 1970-01-01
    • 2020-09-22
    • 1970-01-01
    • 2019-10-18
    相关资源
    最近更新 更多