How to tell QML where Python and PyQt5 is?

production

#1

Hey,

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


#2

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

Any ideas?

Thanks,
Simon


#3

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.


#4

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?


#5

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

You can use this example to test.


#6

This is my external Python,,,

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


#7

And this is my Python for Maya2018,,,


#8

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.


#9

OK,Thank you very much for your answer.

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