How to tell QML where Python and PyQt5 is?

Hey,

1.As the picture shows,there is no “api.py”

2.As the picture shows,I use environment variables instead,but Seemingly does not take effect.

Any ideas?

Thanks,
Simon

Hi @simon,

The api.py is available since 0.8.0 and above (latest version is 1.7.1), see here.

You can find your version using…

import pyblish_qml
print(pyblish_qml.__version__)

To update, since your install is located in the Maya lib directory, I would suggest…

$ cd c:\program files\autodesk\maya2018\python\lib\site-packages
$ pip install pyblish-qml --update --target .

The --target . argument will install it into the local directory, and should replace your current install. If not, then try first removing your existing install. You may also need to run the command-line as Administrator, since that directory is likely write-protected.

Alternatively, you can download the zip from the GitHub link above.

As shown in the figure, this is another problem. Before I installed Qt5 with “pip install git+git://github.com/pyqt/python-qt5.git”

Does that mean I need to upgrade Qt5 from github?

Make sure your external Python is working with the version of PyQt5 you have installed.

You can use this example to test.

This is my external Python,,,

Does this mean that I need to compile PyQt5 for Maya 2018 right?

And this is my Python for Maya2018,,,

Yes, you either need to compile it for Maya, or use a different Python.

Python 3.6 works well with Maya, and PyQt5 is available for it via pip install PyQt5. Give that a try.

OK,Thank you very much for your answer.

p.s.:How to build PyQt5 for Autodesk Maya 2018 64bit