本文介绍了安装适用于Python-3.6的PySide的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试为Python-3.6安装PySide时,它说它仅在Python-3.4之前兼容.是否有任何变通办法可以将其安装在Python-3.6上?

When I try to install PySide for Python-3.6, it says it is only compatible until Python-3.4. Is there any work-around to get it installed for Python-3.6?

似乎仅支持以下Python版本:

Only these Python versions seem to be supported:

[(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)].

推荐答案

首先,应该指出,PySide依赖于Qt4,Qt4不再受正式支持(截至2015年12月).因此,所有开发工作现在都集中在PySide2和Qt5上.根据此跟踪器问题,没有正式的计划在Python-3.4之外还支持PySide-主要是由于资源不足和在Windows上进行编译的困难.当前职位(截至2017年2月)似乎由此帖子:

Firstly, it should be pointed out that PySide depends on Qt4, which is no longer officially supported (as of December 2015). In consequence, all development efforts are now focused on PySide2 and Qt5. According to this tracker issue, there are no plans for officially supporting PySide beyond Python-3.4 - mainly due to lack of resources and the difficulty of compiling on Windows. The current position (as of February 2017), seems to be summed up by this post:

话虽如此,目前有几个Linux发行版维护用于Python-3.5和/或Python-3.6的PySide软件包.这通常只需要对生成绑定的shiboken工具进行小的修补(请参见 Arch Linux PKGBUILD ).此外, Christoph Gohlke的非官方Windows Binaries网站上有Windows滚轮 . (恐怕我对Mac的情况了解不多,但是我确实找到了适用于Python-3.5的轮子).

Having said all that, there are several Linux distros that currently maintain PySide packages for Python-3.5 and/or Python-3.6. This usually only requires a small patch to the shiboken tool which generates the bindings (see the Arch Linux PKGBUILD, for example). In addition, there are Windows wheels available on Christoph Gohlke's Unofficial Windows Binaries site. (I'm afraid I don't know much about the situation for Mac, but I did find this wheel for Python-3.5).

因此PySide本身 目前仍与Python-3.5& 3.6-但官方安装程序不是.但是,如果您愿意打补丁工具链或使用非官方的二进制文件,这应该不是问题.实际上,PySide和Qt4现在是冻结的代码库,因此,除非对Python进行了一些真正的重大更改,否则它应该"在以后的多个发行版中仍然可行.不过,将来是 PySide2 .

So PySide itself is still currently compatible with Python-3.5 & 3.6 - but the official installers aren't. However, if you're willing to patch the toolchain or use unofficial binaries, this shouldn't be a problem. Effectively, PySide and Qt4 are now frozen codebases, so unless there are some really radical changes made to Python, it "should" remain viable for several releases to come. The future is PySide2, though.

这篇关于安装适用于Python-3.6的PySide的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 00:18