Python 2.7 的 Qt5 和 QtQuick 2 绑定 [英] Qt5 and QtQuick 2 bindings for Python 2.7

查看:42
本文介绍了Python 2.7 的 Qt5 和 QtQuick 2 绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 Qt5 和 QtQuick2 与 PyQt 等绑定一起使用,但似乎 PyQt 唯一可用的构建版本是 Python 3.3.我可以在 Python 2.7 中使用任何绑定吗?

I want to use Qt5 and QtQuick2 with a binding such as PyQt, but it seems the only builds available for PyQt are for Python 3.3. Are there any bindings I can use with Python 2.7?

推荐答案

我假设您在谈论 Windows 的二进制安装程序.PyQt5 的维护者已经明确表示他不会为 PyQt5/Python2 提供它们:

I assume you're talking about binary installers for Windows. The maintainer of PyQt5 has made it very clear that he will not be providing them for PyQt5/Python2:

>>> 是否有适用于 PyQt5 和 Python 2.7 的 Windows 二进制安装程序?
>>
>> 不,我不打算提供任何.
>
> 谢谢.有什么特别的原因吗?

>>> Are there any Windows binary installers for PyQt5 and Python 2.7?
>>
>> No, and I don't intend to provide any.
>
> Thanks. Any particular reason?

  1. 依赖项和编译器版本之间的不兼容性 - 不支持 QtWebKit.

  1. Incompatibilities between dependencies and compiler versions - there would be no support for QtWebKit.

我正在尝试限制我维护的安装程序总数.

I'm trying to limit the total number of installer I maintain.

我正在尽我所能鼓励人们转向 Py3.

I'm doing my bit to encourage people to move to Py3.

完全支持 Py2 的 PyQt5,所以没有什么可以阻止任何人其他工作.

PyQt5 for Py2 is fully supported, so there is nothing to stop anybody else doing the work.

所以你最好有一个非常的理由坚持使用 Python2 和 PyQt5,因为你将致力于要么自己维护 Windows 构建,要么依赖第三方来做给你.

So you'd better have a very good reason for insisting on using Python2 with PyQt5, because you'll be commited to either maintaining Windows builds yourself, or relying on a third party to do it for you.

如果您进行一些网络搜索,您会在那里找到一些二进制安装程序,以及用于自己构建它们的说明/教程.但我不会在这里认可其中任何一个,因为我自己还没有尝试过其中任何一个(并且无意这样做).

If you do a little web-searching, you will find a few binary installers out there, as well as instructions/tutorials for buidling them yourself. But I'm not going to endorse any of them here, because I haven't tried any of them myself (and have no intention of doing so).

这篇关于Python 2.7 的 Qt5 和 QtQuick 2 绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆