Having trouble installing and no pyblish_maya module


So I was interested in trying out pyblish as I think it would be something helpful for my workplace and we are also thinking about incorporating ftrack in the future. I’m pretty new to python and setting this kind of thing up so I’ve been running into a couple of issues. FYI I am doing this on windows 10

Following along with the ‘Pyblish by Example’, I installed python 2.7.18 to test out pyblish_maya (as I understand it, since maya uses python 2.7, that’s what I should be using to install all this stuff). I run pip to install pyblish-base, pyblish-maya, and pyblish-lite. Now when I opened up maya (I’m using Maya 2020 but have also been checking with 2019) I don’t get any ‘Publish’ entry under ‘File’ and I get
‘no module for pyblish_maya exists’ error in Maya’s script editor.

I currently have pyblish_maya and pyblish_maya\pythonpath added to my sys environment var. Not sure what else I could be missing.

Hey and welcome!

Could you print your environment variables from Maya?

So would I type this?

I gave that a try in the script editor and it gave me an error

I also tried this but I might be shooting in the dark a little. Anyway, I got this:

print os.environ[‘PYTHONPATH’]
;C:/Program Files/Autodesk/Maya2020/plug-ins/ATF/scripts;C:/Program Files/Autodesk/Maya2020/plug-ins/MASH/scripts;C:/Program Files/Autodesk/Maya2020/plug-ins/fbx/scripts;C:/Program Files/Autodesk/Maya2020/plug-ins/camd/scripts;C:/Program Files/Autodesk/Maya2020/plug-ins/xgen/scripts

Welcome @rallison, the variable PYTHONPATH is indeed likely to blame here. It’s where Python, and in this case Maya looks for Pyblish.

Per default, when you call pip install pyblish then pip will go ahead and install pyblish in the PYTHONPATH it knows. When what we really want it to install it in the PYTHONPATH that Maya knows.

So give this a try and see if this works for you, from cmd.exe

pip install pyblish_base --target %userprofile%\Documents\maya\scripts

Alternatively, if you use PowerShell or pwsh.exe.

pip install pyblish_base --target "$env:USERPROFILE\Documents\maya\scripts"

These will install Pyblish in the same way, except do so for only Maya. If and when you need Pyblish for other software, like Houdini, you can do the same thing.

Alternatively, you can go the more advanced/flexible route and install Pyblish into a central location, and modify PYTHONPATH of each application to point to that directory. But for just getting started, the above approach should suffice.

Hope it helps!

Ah! Thanks so much. That worked and I can now the Publish option under ‘File’. It all seems so obvious now.

1 Like