Where is install pyblish?

Hi guys

Where should I install pyblish?
On the ftrack connect server?
Or on each machine that connects to ftrack?

Hi @hquintanaro and welcome to the forums!

You can install Pyblish on either a server or per machine, it depends on how you prefer to manage your Python libraries.

Some choose to install it on a central location - for example, if you have a shared network drive on Windows such as Z:\ that all of your machines have access to, then it may make sense to install Pyblish on z:\pyblish or an equivalent subdirectory for it and other Python libraries.

If you install per machine, then pip install pyblish would take care of putting it somewhere sensible.

Just don’t forget that in either case you also need to let Maya or whichever host you use know about where it is, for example by also adding the directory onto your PYTHONPATH environment variable. The simplest, but perhaps least flexible option, is to use mayapy with pip and install it directly into the Maya software install directory, if you use Maya.

If you have a more specific description of your setup - e.g. operating system, hosts such as Maya, Nuke or Houdini etc and whether you use and manage other Python libraries, I may be able to give more specific advice.

Hope it helps!

Hello, I’m new at this.
Already install pyblish, also the module pyblish_maya.
But when trying to use the module it does not find it.

  File "/usr/local/lib/python2.7/dist-packages/pyblish_maya/lib.py", line 12, in <module>
    from maya import mel, cmds
ImportError: No module named maya
goyo@MyLAPTOP:~/.local/share/applications$ pip install pyblish_maya
Requirement already satisfied: pyblish_maya in /usr/local/lib/python2.7/dist-packages (2.1.2)
Requirement already satisfied: pyblish-base>=1.4 in /usr/local/lib/python2.7/dist-packages (from pyblish_maya) (1.4.3)
goyo@MyLAPTOP:~/.local/share/applications$ python -c "import pyblish_maya"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pyblish_maya/__init__.py", line 3, in <module>
    from .lib import (
  File "/usr/local/lib/python2.7/dist-packages/pyblish_maya/lib.py", line 12, in <module>
    from maya import mel, cmds
ImportError: No module named maya

Where is my mistak


pyblish-maya only works with Maya.

From a new console, try this:

$ mkdir pyblish
$ cd pyblish
$ pip install pyblish --target .
$ export PYTHONPATH=$(pwd)
$ maya

This will install the default Pyblish packages, including the Maya integration and expose them to Maya.

With Maya up and running, try this from the Script Editor

import pyblish.api

import pyblish_maya

Now you should find a Publish menu item in your File menu.

More information about the Maya integration here

Let me know how it goes!

Hello Marcus:
The fault continues.
perform the procedure of creating a pyblish directory. There install pyblish.
Create the PYTHONPATH, start maya and in python import pyblish.api and pyblish_maya.
I attached the image.

Hey @hquintanaro,

It looks like you are not executing the code inside Maya’s script editor?

If I may, can I ask what it is that you are trying to do?

Hello Marcus:
I want to create the interface for the publication of projects in Maya and Nuke.
By means of ftrack and ftrackconnect.
I’m satisfied with a solution I saw on YouTube.

I want to achieve it in the company and be able to manage the publications of the projects in progress.


Hello Marcus:

A thousand apologies, do not read the procedures. Well that’s an excuse, the other is that I’m not a composer in maya or nuke. I am the sysadmin and I want to collaborate.
Perform the operations in the maya editor script and it worked.
Thank you, I will be more careful to send you my existential problems.

Hello Marcus:

I execute the code inside Maya’s script editor
import pyblish.api

import pyblish_maya

And crash maya.

The report is:

[root@PyblishRG Autodesk_2018-08-28-170227]# cat hquintanaro.20180828.1702.crash
//crash log file name = /usr/tmp/hquintanaro.20180828.1702
//cut = 201603180400 /local/S/Maya_2016_DI/build
//host name = PyblishRG
//release name = 3.10.0-862.9.1.el7.x86_64
//version = #1 SMP Mon Jul 16 16:29:36 UTC 2018
//machine name = x86_64
//current scene = unDisclosed
//directory = /home/hquintanaro/pyblish
//command history (most recent last):
//Python stack:
File: “”, line 2, in ()
File: “/home/hquintanaro/pyblish/pyblish_maya/init.py”, line 3, in ()
from .lib import (
File: “/home/hquintanaro/pyblish/pyblish_maya/lib.py”, line 16, in ()
from .vendor.Qt import QtWidgets, QtGui
File: “/home/hquintanaro/pyblish/pyblish_maya/vendor/Qt.py”, line 237, in ()
File: “/home/hquintanaro/pyblish/pyblish_maya/vendor/Qt.py”, line 223, in _init()
sys.modules[name] = binding()
File: “/home/hquintanaro/pyblish/pyblish_maya/vendor/Qt.py”, line 28, in _pyqt5()
import PyQt5.Qt

Help me … please

It looks like your Maya 2016 have access to PyQt5, but can’t use it. Pyblish will try and find an appropriate version of Qt bindings for Python by importing them, and it’s found PyQt5 which isn’t right.

You can confirm this by importing PyQt5 directly, which should also cause a crash.

from PyQt5 import QtWidgets

If this is true, then you can either (1) make sure PyQt5 is not on your PYTHONPATH when you launch Maya, (2) remove it from your sys.path after you’ve launched Maya or (3) set the QT_PREFERRED_BINDING=PySide environment variable either outside or inside of Maya.

import os
os.environ["QT_PREFERRED_BINDING"] = "PySide"
import pyblish.api

import pyblish_maya

(1) is what I would recommend.