Installation Maya Windows


#1

Hello,

my name is Francesco and I’m trying to start evaluating Pyblish to integrate it into the pipeline of a company I’m working in. So far I’ve read a lot of the Wiki and forum, even some of the chat conversations, but I haven’t found any info on this, sorry if there is already something out there.

I’m having a problem launching Pyblish inside Maya, this is the error I’m getting:

// Error: error: file C:\Program Files\Autodesk\Maya2016\bin\python27.zip\socket.py line 571: 10061 //

The steps I have done are:

  1. Clone with git the current Pyblish in a folder in Pipeline folder structure.
  2. In the wrapper to launch Maya (using ecosystem and with simple batch files) add PYTHONPATH to \pyblish\pythonpath and to \pyblish\integrations\maya to get the env variables.

The Pyblish option in the File menu appears correctly (with icon included), but each time I launch it I get the error above.

Any help is really appreciated!


#2

Hi @cesco, thanks for reporting this.

Could you try this?

$ cd pyblish/pythonpath
$ python -m pyblish_qml --debug

It should launch the GUI under a “debugging” mode, that has a few fake plugins and instances to you to see that everything works.

If that works, then could you try this?

# Same terminal
$ python -m pyblish_qml

You should find the terminal showing a few messages and then block.

Leave it running, and head into Maya to press that “Publish” button in your start menu, and let me know what happens!


#3

Hi! This is what I’ve tried:

# All in same terminal sesion 
$ set PYTHONPATH=D:\pipeline_DEV\python\tools\pyblish\pythonpath;D:\pipeline_DEV\python\tools\python-qt5\PyQt5;%PYTHONPATH%
$ python -m pyblish_qml --debug`

And the results I’m getting:

Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\Dropbox\00_WORK\pipeline_DEV\python\tools\pyblish\pythonpath\pyblish_qml\__main__.py", line 6, in <module>
    from . import app
  File "D:\Dropbox\00_WORK\pipeline_DEV\python\tools\pyblish\pythonpath\pyblish_qml\app.py", line 10, in <module>
    from PyQt5 import QtCore, QtGui, QtQuick, QtTest
ImportError: DLL load failed: %1 is not a valid Win32 application.

#4

Thanks! This looks like the kind of error you might get when using a 64-bit library in a 32-bit interpreter.

The PyQt5 distribution you are using is compiled for 64-bit, you will either have to install a 64-bit interpreter, or look for a 32-bit distribution of PyQt5.

You can see whether you are using 32-bit or 64-bit when you launch Python.

$ python
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32
>>>

#5

Some more alternatives.

  1. pyblish-win includes both the Pyblish libraries, PyQt5 and 64-bit Python, but is being replaced in favour of pyblish-shell.
  2. pyblish-shell includes 64-bit Python and PyQt5, and can be used in conjuction with pyblish/pyblish
  3. pyblish-lite is an alternative to Pyblish QML, without dependence on PyQt5.

Pyblish Lite can replace Pyblish QML, but is still in early development. It’s being written in PySide, and if you are familiar with GUI development, contributions are most welcome.


Pyblish Shell on OSX
#6

This is what I get:

$ python
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

So I also tried with a win64 Python:

$ python
Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

And this is what I’m getting with it:

$ python -m pyblish_qml --debug
Starting Pyblish..
This application failed to start because it could not find or load the Qt platform plugin "windows".

Reinstalling the application may fix this problem.

But… I understand that this is making pyblish_qml not working, but what about the Maya problem? Is Maya bundled with a PyQt not compatible? Maya 2016 Ext1 + SP 6
By the way thanks a lot for the help!


#7

This application failed to start because it could not find or load the Qt platform…

PyQt5 needs one final piece of information, called qt.conf. This file is automatically placed in your c:\python27 directory on install, but since you installed a new Python version after PyQt5, it struggles to know where to look.

You can either look in your 32-bit directory for this file, and copy it over. Or run this from your 64-bit interpreter to install a new one.

$ cd python-qt5
$ python -c "import util;util.createqtconf()"

Reference

But… I understand that this is making pyblish_qml not working, but what about the Maya problem?

Pyblish QML is a client/server type of application, it runs standalone in the background while Maya (and other hosts) communicate with it over interprocess communcation (XML-RPC).

When you launch Maya, Maya automatically tries to launch it in the background, similar to what we are doing here. What must have happened before, is that this very same message popped up, but the error message may have gotten hidden away somewhere.

Once we get it running in any terminal, we’re done. I’d recommend you keep running it in a shell until you are confident that all is well.


#8

That worked, thanks.

Now Pyblish window appears and this is what’s happening:

Case 1.
If I launch pyblish_qml, I get the standalone window and then open a Maya session and click publish I get the correct Maya window.

Case 2.
Open a Maya session without preloading the pyblish_qml I get the same error:
// Error: error: file C:\Program Files\Autodesk\Maya2016\bin\python27.zip\socket.py line 571: 10061 //


#9

I think this is again an issue with the fact that your system has the wrong Python distribution.

As a side-note, perhaps now you can start to appreciate why we developed pyblish-win :slight_smile: Normally, when you use pyblish-win, this has already been solved for you.

When Maya tries to run Pyblish QML, it does what we did here, and it also needs is access to a 64-bit flavour of Python.

You can explore which version of Python Maya has access to with something like this.

# From the Maya script editor
import subprocess
subprocess.Popen(["python"])

In the window that appears, you should be able to see the bit-ness, and you can ask where it’s based like this.

import sys
print(sys.executable)

What you can do, is to expose your 64-bit Python to your PATH such that Maya can find it.

import os
os.environ["PATH"] += ";path/to/64-bit/python"

#10

Uops! I totally get it. I thought I did it but I forgot to add my Python64 folder to PATH in the wrapper launcher for Maya. I don’t know why but I thought I already did. Just adding it to the wrapper works perfectly.

Any suggestions on where to look now for adding “rules” and checks? I get the feeling that you guys have sooo many things going on that is kind of hard to get the updated info/help :slight_smile: on all the repositories.

Thanks again!


#11

Awesome! Glad it works. :slight_smile:

Any suggestions on where to look now for adding “rules” and checks?

Other than the general guidelines at learn.pyblish.com, there are some complex examples available in these.

And an under-the-hood kind of documentation in the developer guide.

Other than that, it’s open road, and you are most welcome to share your experiences here on the forums.