[MAYA] Maya 2015-2016 to Maya 2017 transition. Help!

So I’m trying to ease into Maya 2017 and I found this site pretty helpful. However I’ve run into a road block.

https://github.com/PySide/pyside2/wiki/My_Practice_:_Porting_python_scripts_to_PySide2

Boils down to Shiboken and using wrapInstance. Renaming it shiboken2.pyd to shiboken.pyd does not work. I have a few UI’s where I need to convert Maya Widgets to Qt widgets.

I also tried to use this:
https://github.com/mottosso/Qt.py
My pip install Qt.py does not work so I have to manually place it but not entirely sure where it needs to go so it evals properly.

Anyone else made the transition from PySide to PySide2? Would love some advice.

Cheers,
-Sean

Hey Sean, small world. :slight_smile:

In addition to the wiki page you found, there’s this:

Along with the README for the project.

About your pip install Qt.py, would it be possible to let me know what error you got?

These steps should have you covered.

$ pip install PySide Qt.py
$ python
$ import Qt
$ print(Qt)
<module ‘PySide’ from ‘C:\Users\snolan\your-virtual-env\lib\site-packages\PySide\init.py’>

If not, I’d love to see an issue for it so we can have it fixed as soon as possible.

Thanks!

Hi Marcus,
Thanks for the help.

Here is a screenshot of my output:

We use a different Python path in our environment but pip is installed and has worked for other installed modules.

Fortunately I only have a handful of UI’s that have been built using PySide. I feel sorry for studios that have a big toolset build around this. They’ll have their work cut out for them. :curses:

Alright, well I have the whole shiboken thing figured out. It was just a instance of changing QtGui to QtWidgets in my arguments.

So Marcus, other than not being able to use pip to install Qt.py I think I’m good. There’s a few differences in the way some UI’s paint but I think it’s just a few tweaks.
I guess I’ll have to look into your setup.py to see what’s going on.

Figured it out. My setuptools was out of date. All good now. Thanks for the help. Now on to update all my scripts. Yay!
Cheers!

Hey Sean, thanks for the follow up about the issue. Do you remember how you got initial version of setuptools? I’d like to have a look at possibly supporting this older verson as well if it’s a common thing to have.

Hey Marcus,
Before I was getting an error about “zip_safe”. So there was someone with a similar issue here:
After doing the setuptools update, pip worked fine for me. You could probably just add a disclaimer reminding people to make sure they have the latest of setuptools before pip-ing Qt.py.

pip install --upgrade setuptools

I feel you should not need to worry about supporting an older version of setuptools. I think just letting people know that setuptools needs to be at version >= 0.7 would suffice.

Side Note:
If anyone is having a hard time launching “C:\Program Files\Autodesk\maya2017\bin\designer.exe”, I found this bit of info in the Beta Forums.
set MAYA_LOCATION=C:\Program Files\Autodesk\Maya2017\

is that a system-wide environment variable?

should only matter to that instance of designer, no?