Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named pyblish_qml #71

Open
monsteradurm opened this issue Jul 31, 2018 · 6 comments
Open

No module named pyblish_qml #71

monsteradurm opened this issue Jul 31, 2018 · 6 comments

Comments

@monsteradurm
Copy link

Receiving the error "No module named pyblish_qml" when attempting to exec pyblish_maya.show() under maya 2018.

executing:

import pyblish_qml, pyblish, pyblish_maya
from pyblish_qml import api

sys.path.append(r'G:\_PIPELINE_MANAGEMENT\_externalPythonLibraries\pyblish_maya\pythonpath')

pyblish.api.register_gui("pyblish_qml")
api.register_python_executable("C:/Python27/python.exe")
api.register_pyqt5(r'G:\_PIPELINE_MANAGEMENT\_externalPythonLibraries\PyQt5')

pyblish_maya.setup()
pyblish_maya.show()

result:

pyblish: Deregistered g:/_PIPELINE_MANAGEMENT/_externalPythonLibraries\pyblish_maya\plugins
pyblish: Integration torn down successfully
pyblish: Registered g:/_PIPELINE_MANAGEMENT/_externalPythonLibraries\pyblish_maya\plugins
Pyblish loaded successfully.
Setting up Pyblish QML in Maya
Using Python @ 'C:/Python27/python.exe'
Using PyQt5 @ 'G:\_PIPELINE_MANAGEMENT\_externalPythonLibraries\PyQt5'
Targets: default
Success. QML server available as pyblish_qml.api.current_server()
C:\Python27\python.exe: No module named pyblish_qml
@mottosso
Copy link
Member

mottosso commented Jul 31, 2018

Make sure pyblish_qml is on your PYTHONPATH environment variable, that's the one getting passed to your Python executable (not sys.path, which is only used by Maya).

import os
...
os.environ["PYTHONPATH"] += os.pathsep + os.sep.join(pyblish_qml.__file__.rsplit(os.sep)[:-2])
...
pyblish_maya.show()

If you know where pyblish_qml is, best to add the path directly instead of the .rsplit mess above.

These can also be added to your environment prior to launching Maya.

# On Windows
$ set PATH=%PATH%;c:\python27
$ set PYTHONPATH=c:\pythonpath
$ maya

Let me know if this works for you.

@monsteradurm
Copy link
Author

This fixes the original issue, though I am receiving a dialog stating

"This application failed to start because it could not find or locate the Qt platform plugin "Windows" in "".

@mottosso
Copy link
Member

Make sure your PyQt5 installation works with that Python version.

@monsteradurm
Copy link
Author

monsteradurm commented Aug 1, 2018

Thanks.
Getting closer..

I am getting yet another error though:

Setting up Pyblish QML in Maya
Using Python @ 'C:/python27/python.exe'
Using PyQt5 @ 'C:\Python27\Lib\site-packages\PyQt5'
Targets: default
Success. QML server available as pyblish_qml.api.current_server()
Starting pyblish-qml
Done, don't forget to call `show()`
  HiddenSections = [u'Collect']
  ContextLabel = Maya
  WindowSize = [430, 600]
  WindowPosition = [100, 100]
  WindowTitle = Pyblish (Maya)
  HeartbeatInterval = 60
Settings: 
Entering state: "alive"
Entering state: "clean"
Entering state: "ready"
Entering state: "hidden"
Entering state: "visible"
file:///g:/_PIPELINE_MANAGEMENT/_externalPythonLibraries/pyblish_qml/qml/app.qml:9:1: module "QtQuick.Controls" version 1.3 is not installed

I have followed the advice/instructions here but havent been able to resolve the issue.
pyblish/pyblish-qml#215

executing:

sys.path.append(r'G:\_PIPELINE_MANAGEMENT\_externalPythonLibraries\pyblish_maya\pythonpath')
os.environ["PYTHONPATH"] += os.pathsep + os.sep.join(pyblish_qml.__file__.rsplit(os.sep)[:-2])
os.environ["QML2_IMPORT_PATH"] = 'C:/Python27/Lib/site-packages/PyQt5/qml'
pyblish.api.register_gui("pyblish_qml")
api.register_python_executable("C:/python27/python.exe")
api.register_pyqt5(r'C:\Python27\Lib\site-packages\PyQt5')
pyblish_maya.setup()

@mottosso
Copy link
Member

mottosso commented Aug 1, 2018

Thanks for sharing what you tried, but which advice did you follow exactly? Installing via pip3 or installing via Git?

It looks like your version of PyQt5 is too old; this should work.

@monsteradurm
Copy link
Author

monsteradurm commented Aug 3, 2018

Using the git install resolves the issue within pyblish_maya, but stops my pyblish_nuke from working..
Perhaps I need to be using separate PyQt installs for different versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants