Trying to set up pyblish and running into common problems all typical users hit


#1

Hello, I have been looking at Pyblish as a pipeline option at a small studio that is preparing to take on larger 3D animation projects. We have been evaluating PIPELINE and though it is easy to setup and use it isn’t quite as full featured as what I have read and seen of Pyblish.

This all being said I am running into the usual hangups in simply trying to get things to run.

I installed Python 2.7.15
I ran pip install pyblish.

It runs from the terminal but hits an error.

> pyblish-qml 1.8.5 has requirement pyblish-base==1.5.3, but you’ll have pyblish-base 1.7.2 which is incompatible.

I found another thread that said to

mkdir pyblish
pip install pyblish --target…

I look at the – target and think… He means… not to type “–target” but rather… the “c:\pyblish” directory right?

I do it even though I know the original pyblish install has already install inside the “c:\python27” directory. I do it because this newer post is dated far more recent so I think… "oh, ok the install has been updated in the forum and the “install” I found is outdated.

I want to install this of course for Maya so I can simply run it.

But didn’t want to proceed forward until this install process is smoothed out with no errors.

Perhaps when I get it set up right I can contribute a YouTube tutorial to show people how to install step by step for set up of pyblish and integrated into Maya. This would probably help this neat set of helpful tools reach more people than just those who are brave enough to manually edit path and env variables which often scares off the average person.

Thanks for any feedback on this. Looking forward to testing and possible making Pyblish our in house solution.


#2

Hi @Intuition, thanks for sharing this. It looks like you’ve found a problem with the pyblish pip package.

By the looks of things, that message is just a warning, and I can tell you right away that they are in fact compatible. Here’s what you can do to test your installation.

$ mkdir mypyblish
$ cd mypyblish
$ pip install pyblish --target .
$ set PYTHONPATH=%cd%
$ python -m pyblish_qml --demo

The “.” at the end of --target means “the current directory”

Following this, you should see Pyblish installed into your mypyblish directory, which can of course be anywhere.

I then add the directory to my PYTHONPATH which is needed for Pyblish QML to run from the command-line like this, and then run Pyblish QML.

You didn’t mention having PyQt5 installed, which is a requirement of Pyblish QML. Even if you use Maya 2015+, I would recommend you deploy Python 3.6+ on your machine instead of 2.7, as the process of installing PyQt5 can be reduced to this:

$ pip install PyQt5==5.7.1

Don’t worry, Pyblish QML is the only process using Python 3, and it will still work with Maya and any other DCC using Python 2. To install PyQt5 for Python 2, have a look at these instructions. Just make sure you’ve got the 64-bit version of Python 2 (it isn’t the default).

From here, see here for getting things running from within Maya, replacing “pyblish_lite” with “pyblish_qml”, and then you should be good to go!

That would be magical, thank you for offering that. Many users have this problem, and it’s tricky to get all the nuances right in plain-text.

Let me know if you need any more help, and good luck!


#3

Thank you for your quick feedback… yes I knew I had to install pyQt5 which I have been meaning to do just to get access to some UI elements for Maya UI dev… but wanted to make sure I get all the steps right before moving on…

SO, so far running the first block of commands worked and then the last command gave back…

Traceback (most recent call last):
_ File “C:\Python27\lib\runpy.py”, line 174, 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 “C:\pyblish\pyblish_qml_main_.py”, line 6, in _
_ from . import app_
_ File “pyblish_qml\app.py”, line 12, in _
_ from PyQt5 import QtCore, QtGui, QtQuick, QtTest_
ImportError: No module named PyQt5

So yes, it is saying PyQt5 is not installed.
I entered command for installing PyQt5==5.7.1 and it says…

Could not find a version that satisfies the requirement PyQt5==5.7.1 (from versions: )
No matching distribution found for PyQt5==5.7.1

I have both 2.7 and 3.7 Python installed and env variables in the path. The python installers now have a checkbox to add each version to the path. Hopefully this automated setup is correct.


#4

It also now says.

Could not find a version that satisfies the requirement PyQt5==5.7.1 (from versions: 5.8, 5.8.1.1, 5.8.2, 5.9, 5.9.1, 5.9.2, 5.10, 5.10.1, 5.11.2, 5.11.3)
No matching distribution found for PyQt5==5.7.1

After I relaunched the terminal to make sure it refreshed.


#5

Your pip will be assigned to only one of your Python’s (the last one you installed), but you can force it by doing this:

c:\python37\python -m pip install PyQt5=5.7.1

Ah, likely that Python 3.7 doesn’t have access to PyQt5.7, that might ok, try the 5.8 version and see how it goes. Worst case, you may have to downgrade your Python until we can add support for newer versions of PyQt for Pyblish QML.


#6

You mean downgrade 3.7 to 3.6?

It is saying…

_C:\pyblish>c:\python37\python -m pip install PyQt5=5.7.1
Invalid requirement: ‘PyQt5=5.7.1’
= is not a valid operator. Did you mean == ?

C:\pyblish>c:\python37\python -m pip install PyQt5==5.7.1
Collecting PyQt5==5.7.1
Could not find a version that satisfies the requirement PyQt5==5.7.1 (from versions: 5.8, 5.8.1.1, 5.8.2, 5.9, 5.9.1, 5.9.2, 5.10, 5.10.1, 5.11.2, 5.11.3)
No matching distribution found for PyQt5==5.7.1_

I’ll down to 3.6 if it will help.


#7

Yes, it should be ==, sorry!

Try this.

c:\python37\python -m pip install PyQt5=5.8

#8

Ok, that installed PyQT5.8

Now I should go into Maya and add the Python commands to the shelf?


#9

Give that --demo line above a try first, to make sure everything installed correctly.


#10

Ok I think it worked… I mean… the demo command last in the first list launches me into a python terminal within the cmd line.


#11

Perfect. After that, you can do:

# make sure you are still in the same directory as above, the "mypyblish" directory in this case
set PYTHONPATH=%cd%;%cd%\pyblish_maya\pythonpath
call "c:\program files\autodesk\maya2018\bin\maya.exe"

That should launch Maya (you can change to a different version if you want) with a Publish option available in your File menu.

If not, then have a look in the pyblish_maya\pythonpath\ directory, in the userSetup.py that resides there. That’s what is supposed to get called on Maya launch.


#12

Ok it is working… We didn’t tell it what to do… but Maya has Publish in the File menu…

Here is the Uh Oh which is because we didn’t do the Maya install part right?
_Also I haven’t run the Python commands in Maya yet. _

_No registered GUI found.

_In order to show you a GUI, one must first be registered. _
Pyblish supports one or more graphical user interfaces to be registered at once, the next acting as a fallback to the previous.

For example, to use Pyblish Lite, first install it:

$ pip install pyblish-lite

Then register it, like so:

>>> import pyblish.api
>>> pyblish.api.register_gui(“pyblish_lite”)

The next time you try running this, Lite will appear.
See http://api.pyblish.com/register_gui.html for more information._


#13

Ok, almost there!

Go back to your terminal, and type this before launching Maya.

$ set PYBLISH_GUI=pyblish_qml
$ set PYBLISH_QML_PYTHON_EXECUTABLE=c:\python37\python.exe
$ call "c:\program files\autodesk\maya2018\bin\maya.exe"

Let me know what happens. :slight_smile:


#14

Ok, I saw a loading icon with the pyblish logo. But it never changed and Maya seemed responsive but the pyblish blue logo kept saying loading for a few minutes but never changed. I closed Maya and restarted the computer given that we installed quite a few things all at once.

Only now… when I start maya again… even using the commands in the last post… it does not start with Pyblish in the file menu.

So what ever I do I will probably need to create a batch or executable that sets up the env every time before launch because it is not automatically there after all the install. Like I need to run all these commands in the terminal before Maya launch.


#15

Ah here we are.

Setting up Pyblish QML in Maya
Using Python @ ‘c:\python37\python.exe’
Using PyQt5 @ ‘None’
Targets: default
Success. QML server available as pyblish_qml.api.current_server()
Event filter has been installed.
Traceback (most recent call last):
File “c:\python37\lib\runpy.py”, line 193, in _run_module_as_main
File “c:\python37\lib\runpy.py”, line 85, in run_code
main”, mod_spec)
File "C:\pyblish\pyblish_qml_main
.py", line 6, in
exec(code, run_globals)
File “C:\pyblish\pyblish_qml\app.py”, line 15, in
from . import app
File “C:\pyblish\pyblish_qml\util.py”, line 121
from . import util, compat, control, settings, ipc
SyntaxError: invalid syntax
^
def async(target, args=None, kwargs=None, callback=None):
The eventFilter of pyblish-qml has been removed.


#16

I am using vanilla Maya 2018… not any of the point releases. Should I upgrade?


#17

Have a look at what the Script Editor has to say when that happens.

Yes, that is advisable. I myself have a maya2018.bat for all of my variables.

The line responsible for putting Publish in the file menu is the one adding pyblish_maya\pythonpath to your PYTHONPATH. That directory contains a userSetup.py which Maya executes on start-up.

Interesting, that is new to me. I suspect an incompatibility with Python 3.7. If possible, give this a try with 3.6. Alternatively, if you are able, have a look at that line, and see whether you can spot what might be wrong with it. I haven’t used 3.7 yet myself, but it’s possible they’ve broken backwards compatibility.


#18

No, this looks like an issue separate from Maya.


#19

Ok, I’ll downgrade and be back with results…

I mean… downgrade Python to 3.6


#20

Yesterday I somehow lost Pyblish. I tried to setup one plugin and after maya restarted there was no more pyblish in the file menu even though I was starting it with call. This morning I started over and setup everything again and it works and runs the demo BUT. in maya it says this…

No registered GUI found.

_In order to show you a GUI, one must first be registered. _
Pyblish supports one or more graphical user interfaces to be registered at once, the next acting as a fallback to the previous.

For example, to use Pyblish Lite, first install it:

$ pip install pyblish-lite

Then register it, like so:

>>> import pyblish.api
>>> pyblish.api.register_gui(“pyblish_lite”)

The next time you try running this, Lite will appear.
See http://api.pyblish.com/register_gui.html for more information.

Which I did try to type those commands into Python
since… the >>> implies Python terminal.

No luck though…

EDIT — OK never mind… restarted computer… loaded up Maya. It works now.

Also the link does not go to a webpage. I copy pasted it and it gives a page not found.

I did get Pyblish Starter installed and working though. :slight_smile: