PyQt for maya2017

PyQt for maya2017

Anonymous
Not applicable
4,129 Views
6 Replies
Message 1 of 7

PyQt for maya2017

Anonymous
Not applicable

Hello,

 

I tried to install PyQt into maya2017 and import it.

Since there is no docs for Maya2017 yet, so I just followed the maya2016 one;

http://download.autodesk.com/us/support/files/maya_documentation/pyqtmaya2016.pdf

 

but I got the following error when trying to configure;

$QTDIR/bin/mayapy ./configure.py LIBDIR_QT=$LIBDIR_QT INCDIR_QT=$INCDIR_QT MOC=$QTDIR/bin/moc -w --no-designer-plugin

(page 7 - linux vers)

 

Querying qmake about your Qt installation...

Determining the details of your Qt installation...

/usr/autodesk/maya2017/bin/qmake -o qtdetail.mk qtdetail.pro

Project ERROR: Unknown module(s) in QT: core

Error: Failed to determine the detail of your Qt installation. Try again using

the --verbose flag to see more detail about the problem.

make: *** No targets specified and no makefile found. Stop.

make: *** No rule to make target `install'. Stop.

 

Any idea?

0 Likes
4,130 Views
6 Replies
Replies (6)
Message 2 of 7

sean.heasley
Alumni
Alumni

Hi @Anonymous unfortunately PyQt 4 no longer works with Maya 2017 however I found this article that may help you make any scripts compatible with 17 and older versions of Maya as well.

0 Likes
Message 3 of 7

Anonymous
Not applicable

First of all, thank you for suggesting such a nice article.

It looks helpful to convert PyQt4 codes to PyQt5.

I tried to install PyQt5 instead of PyQt4, though.

As you know, Maya2017 has "qt-5.6.1-include.tar.gz" inside "include" folder.

 

How can we build PyQt5 for maya2017?

I just followed the PyQt4.8.6 for Maya2016 guide, but got the error above.

 

 

 

0 Likes
Message 4 of 7

Anonymous
Not applicable

Out of curiosity, is there a specific reason for using PyQt5 over PySide? It'll prevent you from having to recompile with each version as it's included as part of the Qt spec. Other apps like Nuke seem to be pushing for PySide usage now as the primary API to use.

 

And like in the article Sean pointed out, I would highly recommend using Qt.py. Lifesaver and a half. I've never tried building PyQt for Maya, so I won't be much help here.

 

In checking the docs thoroughly, I would say AD is advising against it considering the guides for using PyQt stopped with 2016 (https://knowledge.autodesk.com/support/maya/getting-started/caas/simplecontent/content/maya-document...), but then again they are also lacking local docs for that Update 1+ of 2017.

0 Likes
Message 5 of 7

Anonymous
Not applicable

Thank you for respond, Mike.

 

I used PyQt4 for Maya2015 and have lots of scripts implemented with PyQt4.

That's the main reason for using PyQt5 over PySide2.

But if there are easy way to convert PyQt4 codes to PySide2, I will definitely try it.

 

Sure. I will probably use Qt.py from now, but I need to use my PyQt4 codes anyway.

So if you have any way to use PyQt4 codes for Maya2017, please let me know.

That's absolutely my lifesaver 🙂

0 Likes
Message 6 of 7

Anonymous
Not applicable

The best thing I could think of would be to run the pyqt4topyqt5 script linked to in the article on a copy of your existing code-base. Then just for kicks try switching your import statements to use Qt instead of PyQt5 once you have that script installed.

 

Also, reference this once you start developing again: https://fredrikaverpil.github.io/2016/07/25/developing-with-qt-py/

0 Likes
Message 7 of 7

Anonymous
Not applicable

First of all, I really appreciate your help.

 

I just change the "qt.conf" like following;

(just added Qt into "Headers")

[Paths]
Prefix=$(MAYA_LOCATION)
Libraries=lib
Binaries=bin
Headers=include/Qt
Data=.
Plugins=qt-plugins
Translations=qt-translations
Qml2Imports=qml

 

Then, it started to build but I got the following error now;

....

The interpreter used by pyuic5 is
/mnt/x19/hdx/apps/autodesk/maya2017/bin/python-bin.
Generating the C++ source for the QtCore module...
/hdx/apps/autodesk/maya2017/bin/sip -w -f -x VendorID -t WS_X11 -t Qt_5_6_1 -x Py_v3 -B Qt_6_0_0 -o -P -c /mnt/x19/hdx/cg/python/packages/PyQt5_gpl-5.6/QtCore -I sip -I /mnt/x19/hdx/cg/python/packages/PyQt5_gpl-5.6/sip /mnt/x19/hdx/cg/python/packages/PyQt5_gpl-5.6/sip/QtCore/QtCoremod.sip
sip: Deprecation warning: /mnt/x19/hdx/cg/python/packages/PyQt5_gpl-5.6/sip/QtCore/QtCoremod.sip:23: %Module version numbers are deprecated and ignored
Error: Unable to create the C++ code.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.

 

Any idea?

 

 

0 Likes