Pyside 2 only works with Python 3?

2,112 views
Skip to first unread message

Deke Kincaid

unread,
Jun 23, 2016, 1:22:32 PM6/23/16
to vfx-platfo...@googlegroups.com
Does anyone know anything about this recent update in the pyside 2 wiki?  How are we requiring Pyside 2 & python 3 if that is the case?

Nick Cannon

unread,
Jun 23, 2016, 1:36:03 PM6/23/16
to vfx-platform-discuss, dekek...@gmail.com
On Thursday, June 23, 2016 at 10:22:32 AM UTC-7, Deke Kincaid wrote:
Does anyone know anything about this recent update in the pyside 2 wiki?  How are we requiring Pyside 2 & python 3 if that is the case?


That's new to me and hopefully is only referring to Windows given the comments about MS VC++. Thanks for flagging, we will investigate...

Nick

David Aguilar

unread,
Jun 23, 2016, 1:38:16 PM6/23/16
to Deke Kincaid, vfx-platfo...@googlegroups.com
That's a great question.

Related to this topic, as a (studio) user, it might be advantageous to
guard against these types of changes, especially if the studio is
already using PyQt4.

I recently stumbled upon QtPy:

https://github.com/spyder-ide/qtpy


Currently, QtPy supports PyQt4, PyQt5, and Pyside. When Pyside2
materializes, they will add Pyside2 support (there's an open issue to
add it). If we're concerned about porting to pyside2 then we could
hedge that risk by using qtpy.
--
David

Deke Kincaid

unread,
Jun 23, 2016, 1:50:56 PM6/23/16
to Nick Cannon, vfx-platform-discuss
Yes, I figure it was a Windows issue but as you know it is not really feasible to add Pyside 2 for Linux/OS X and not for Windows for any software manufacturer.  That would pretty much prevent both Pyside 2 and qt5 updates for almost everyone....

Fredrik Averpil

unread,
Jun 23, 2016, 2:10:38 PM6/23/16
to Deke Kincaid, Nick Cannon, vfx-platform-discuss
Hm, this sounds quite alarming...

On the QtPy topic, figured I'd just mention that some of us are developing something similar, with a very similar name: https://github.com/mottosso/Qt.py
I'm currently developing an application for PySide/PyQt4 and PySide2/PyQt5 and I'm using Qt.py.

// Fredrik


René Calles

unread,
Jun 23, 2016, 2:21:25 PM6/23/16
to vfx-platform-discuss, dekek...@gmail.com
I totally agree with Deke on the x-Platform point. For us it is super important to have Windows support as well and i am sure the big software vendors will want that too. So, either we go the Python 3 route or we again have to maintain a custom Qt5 build which can support Python 2 bindings.

Nick Cannon

unread,
Jun 23, 2016, 2:27:32 PM6/23/16
to vfx-platform-discuss, dekek...@gmail.com
On Thursday, June 23, 2016 at 11:21:25 AM UTC-7, René Calles wrote:
I totally agree with Deke on the x-Platform point. For us it is super important to have Windows support as well and i am sure the big software vendors will want that too. So, either we go the Python 3 route or we again have to maintain a custom Qt5 build which can support Python 2 bindings.

It's looking like this is a compiler selection issue rather than code incompatibility. As long as an appropriate compiler is used then PySide 2 is compatible with Python 2. Hopefully one of the software vendors can chime in to confirm...

For those attending SIGGRAPH, we have a VFX Ref Platform Birds of a Feather scheduled for noon on the Wednesday and we can discuss Qt bindings along with cross-platform compatibility in more detail. The Qt Company are keen to engage more with this community and hopefully they will be joining us to participate in the discussion and hear our feedback directly.

Nick

Wayne Arnold

unread,
Jun 23, 2016, 2:56:32 PM6/23/16
to Deke Kincaid, Nick Cannon, vfx-platform-discuss

I’m assuming the driving force on Windows is that the python.org binary distribution is using the older Visual Studio 2008 compiler.

 

If one is not using that binary distribution and building Python from source using a later version, then there is no issue with building/running PySide2 for your own build of Python

 

Yes that can make 3rd party modules incompatible due to the different Windows VC runtimes,   though many of them can be rebuilt or have additional builds themselves that can be used.

Or other means of  using them

 

Wayne

--
You received this message because you are subscribed to the Google Groups "vfx-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vfx-platform-dis...@googlegroups.com.
To post to this group, send email to vfx-platfo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vfx-platform-discuss/CAOOm49S2KJznf_2-un%2BBxdY8onQb7LWRGMFXRXXjgZZtfQbifQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Deke Kincaid

unread,
Jun 23, 2016, 3:05:26 PM6/23/16
to Wayne Arnold, Nick Cannon, vfx-platform-discuss
I'll comment on the wiki post and get them to make it a bit more specific.

Wayne Arnold

unread,
Jun 23, 2016, 3:22:01 PM6/23/16
to Deke Kincaid, Nick Cannon, vfx-platform-discuss

Note that the PySide2 github   is not the work being done by The Qt Company, where their current development is taking place

 

http://wiki.qt.io/PySide2

Marcus Ottosson

unread,
Jun 23, 2016, 4:53:47 PM6/23/16
to vfx-platform-discuss

For future generations wondering what we’re all talking about once the Wiki page has changed.

And a copy for completeness.

Welcome to the pyside2 wiki!

PySide is a Python 2/3 binding for Qt4.
PySide2 is a binding for Python 3 and Qt5.

Why there is no PySide2 for Python 2? Because Python 2 extensions like PySide need to be compiled with ancient version of MS Visual C++ 9 and that means that all linked libs including Qt need to be compiled with this version. But Qt5, the library that PySide2 wraps, dropped support for MS VC++ 9, and code is unlikely to compile for it anymore. The only solution to fix this, is to help with development and funding of https://mingwpy.github.io/

​


For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

René Calles

unread,
Jun 27, 2016, 3:39:30 AM6/27/16
to vfx-platform-discuss, dekek...@gmail.com
Okay,

after some discussions i'll try to summarise the current state:

The Qt Company is not going to support Python2 for the official builds.
This is because they dropped VS2008 support on Windows and all bundled Python is compiled using VS2008 and that may break dependencies down the line.

Christian Tismer (current Maintainer of PySide2) on that topic:

"@ReneVolution well, if you have to use Python2.7 from the official web site, then you are out of luck on Windows.
It would easy to build Python 2.7 with a newer Compiler, if that is an option. I meant rather easy, but I know how… 
QtC tossed the support for VS2008, and — poof — nothing in the intersection "

What that means is, if you build your Python 2 and any package you need using VS2012 you're good to go until Python 2 support may be broken within PySide2. 

That said, i still think we need Python 3 support here for future projects.

Cheers,
René

Marcus Ottosson

unread,
Jun 27, 2016, 4:11:16 AM6/27/16
to vfx-platform-discuss
Thanks for the heads up, Rene.

Any word on whether it will still make it into DCCs, like Maya? Or are they about to transition into Python 3 land as well (a.k.a. is the world about to explode)?

--
You received this message because you are subscribed to the Google Groups "vfx-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vfx-platform-dis...@googlegroups.com.
To post to this group, send email to vfx-platfo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

René Calles

unread,
Jun 27, 2016, 4:45:32 AM6/27/16
to vfx-platform-discuss
Hey Marcus,

as far as i know is Autodesk already using custom VS2012 based Python 2 builds in current Maya. 
No words about them willing to move to Py3. But i don't know the Roadmap at all. :)

Cheers,
René

Marcus Ottosson

unread,
Jun 27, 2016, 5:05:48 AM6/27/16
to vfx-platform-discuss
Ah ok, so Python 2 will continue to be supported, just not the VS2008 version on Windows. So if we build one with VS2012, maybe we've got nothing to worry about. And as an added bonus, we've got the same version as DCCs do, making compiled libraries work both inside and out.

What about on platforms other than Windows?

Best,
Marcus

--
You received this message because you are subscribed to the Google Groups "vfx-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vfx-platform-dis...@googlegroups.com.
To post to this group, send email to vfx-platfo...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Deke Kincaid

unread,
Jun 28, 2016, 1:37:53 AM6/28/16
to René Calles, vfx-platform-discuss

On Mon, Jun 27, 2016 at 12:39 AM, René Calles <rca...@ea.com> wrote:
What that means is, if you build your Python 2 and any package you need using VS2012 you're good to go until Python 2 support may be broken within PySide2. 

Half the vendors haven’t even finished updating to gcc 4.8 yet, let alone started on QT 5.6.  The move to python 3.x is pretty huge.  I would start with baby steps such as requiring python 2.7.x with backports or futures module.

René Calles

unread,
Jun 28, 2016, 1:59:35 AM6/28/16
to vfx-platform-discuss, rca...@ea.com, dekek...@gmail.com
@Marcus: I am not aware yet of any other platform with this kind of issue right now.

@Deke: You'd still need to distribute your own Python 2.7.x (including required packages) for windows. The VFX Reference Platform could host their own Python binary package for that as a solution.

bde...@gmail.com

unread,
Aug 15, 2016, 10:43:51 AM8/15/16
to vfx-platform-discuss
So I don't suppose, Any one is keen to make installer for python 2.7, QT, PySide?

I assume one or many people have been forced to do it, has any one got any advice?

Marcus Ottosson

unread,
Aug 21, 2016, 3:01:20 PM8/21/16
to bde...@gmail.com, vfx-platform-discuss

The continuous integration files in their original GitHub repository has got some hints on how to build it for 2.7 on Ubuntu 14.04 (.travis.yml) and Windows (appveyor.yml).

If you aren’t familiar with these services, they are more or less a remote computer running each line in the script portion of these files on a newly installed copy of the corresponding OS. So, in theory, if your system is pure enough you should be able to run these commands yourself without issues.

Granted, they apply to the version of PySide in that repo, which is no longer up to date. You could give the same commands a try with the latest repo too and hope for the best.

$ git clone https://code.qt.io/pyside/pyside-setup
​

On 15 August 2016 at 12:44, <bde...@gmail.com> wrote:
So I don't suppose, Any one is keen to make installer for python 2.7, QT, PySide?

I assume one or many people have been forced to do it, has any one got any advice?
--
You received this message because you are subscribed to the Google Groups "vfx-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vfx-platform-discuss+unsub...@googlegroups.com.
To post to this group, send email to vfx-platform-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vfx-platform-discuss/6eee6caf-08ae-4f2d-8c15-554a6ecb0347%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

Fredrik Averpil

unread,
Aug 22, 2016, 4:56:51 AM8/22/16
to Marcus Ottosson, bde...@gmail.com, vfx-platform-discuss
I'm building PySide2 wheels currently on CentOS 7, Ubuntu 16.04, Mac OS X and Windows:

Just like Marcus mentioned, I'm using Travis and AppVeyor.

I'm facing some issues with modules not being found on CentOS 7 which I've worked around. Some similar issues still in effect in Ubuntu 16.04. And for Windows, I'm using MSVC2015 to compile the Python 2.7 versions of the wheels although I suspect it would have been better to use MSVC2008 (although that doesn't seem possible at the moment without building Qt5 from source).

The wheels being built are not "standalone" or "portable", and require you to have Qt5 installed locally.

It would be awesome to be able to one day offer standalone wheels, but I don't know how to achieve that and I suspect this requires work in Qt and not only during the PySide2 build process?

// Fredrik



Marcus Ottosson

unread,
Aug 22, 2016, 9:51:07 AM8/22/16
to Ben De Luca, Fredrik Averpil, vfx-platform-discuss
> It would be awesome to be able to one day offer standalone wheels, but I don't know how to achieve that and I suspect this requires work in Qt and not only during the PySide2 build process?

That can definitely be done. Here's one way of doing this with PyQt5.

- https://github.com/pyqt/python-qt5/wiki/Updating-the-repository#bundling

The tricky part is knowing what to bundle, though it should be relatively similar, if not exactly the same, for both PyQt5 and PySide2.

On 22 August 2016 at 10:36, Ben De Luca <bde...@gmail.com> wrote:
Call me crazy but one day it would be nice to be able to download the
VFX reference platform.



--
Marcus Ottosson
konstr...@gmail.com

Ben De Luca

unread,
Aug 22, 2016, 10:18:11 AM8/22/16
to Fredrik Averpil, Marcus Ottosson, vfx-platform-discuss
Call me crazy but one day it would be nice to be able to download the
VFX reference platform.

On 22 August 2016 at 11:56, Fredrik Averpil <fredrik...@gmail.com> wrote:

Fredrik Averpil

unread,
Aug 24, 2016, 2:28:59 AM8/24/16
to Marcus Ottosson, Ben De Luca, vfx-platform-discuss

That can definitely be done. Here’s one way of doing this with PyQt5.

The tricky part is knowing what to bundle, though it should be relatively similar, if not exactly the same, for both PyQt5 and PySide2.

Hm, interesting. I’m now having wheels built by Travis/AppVeyor and uploaded to Bintray on all commits for all branches/pull requests, so if anyone has the time I more than welcome anyone to take a look at that and make a pull request.

https://github.com/fredrikaverpil/pyside2-wheels

// Fredrik

​

Marcus Ottosson

unread,
Aug 24, 2016, 2:38:16 AM8/24/16
to Fredrik Averpil, vfx-platform-discuss
That is one mammoth effort, great job Fredrik!

How does one use the fruits of this labour?
--
Marcus Ottosson
konstr...@gmail.com

Fredrik Averpil

unread,
Aug 24, 2016, 3:26:50 AM8/24/16
to Marcus Ottosson, vfx-platform-discuss

That is one mammoth effort, great job Fredrik!

Thanks! Yeah, hehe. It took some time to get Travis and AppVeyor to play nice since I can’t run those locally.

How does one use the fruits of this labour?

I wish I could tell you to just download the wheel of choice from Bintray and pip install it. But since the wheels aren’t standalone/portable, you first have to make sure to have Python and Qt5 installed of the appropriate versions, installed in the appropriate paths locally. The details on these environments can be seen in various places in the Github repository depending on your OS:

  • Dockerfiles-<os-version> for CentOS 7 or Ubuntu 16.04
  • .travis.yml for OS X
  • appveyor.yml for Windows

These wheels also have the same issue as the official PySide(1) wheels, which means you have to perform the following prior to performing e.g. a from PySide2 import QtWidgets:

export DYLD_LIBRARY_PATH=/usr/local/lib/python3.5/site-packages/PySide2/

I’ll add this info to the project’s README, as well as instructions on how to install the wheels on the other platforms.

// Fredrik

​

Marcus Ottosson

unread,
Aug 24, 2016, 6:19:11 AM8/24/16
to Fredrik Averpil, vfx-platform-discuss
Ah, that's a shame. But I think it's a good step at finding the simplest solution, now that it's out in the open like this.

I had one thought, about OS compatibility. It can be a good idea to compile your wheels with the oldest distribution possible. Simply because builds on older distributions are more likely run on newer ones than vice versa.

In this case, I'd try and build with the oldest distribution supported by Qt themselves, and if none is supported (e.g. Arch or Gentoo), the oldest one you can manage to build it on. Just a thought.
​

Fredrik Averpil

unread,
Aug 24, 2016, 7:05:19 AM8/24/16
to Marcus Ottosson, vfx-platform-discuss

I had one thought, about OS compatibility. It can be a good idea to compile your wheels with the oldest distribution possible. Simply because builds on older distributions are more likely run on newer ones than vice versa.

Yes, this crossed my mind too. Now that the project is up and building automatically on commits and pull requests, such development could be easier to implement.

As always, feel free to submit a PR! :)

​
Reply all
Reply to author
Forward
0 new messages