pyblish / pyblish-qml

Pyblish QML frontend for Maya 2013+, Houdini 11+, Nuke 8+ and more
GNU Lesser General Public License v3.0
114 stars 44 forks source link

Doesn't work with Nuke #301

Closed mottosso closed 4 years ago

mottosso commented 6 years ago

As reported by Jakub over in the chat, there's something preventing Pyblish QML from working with Nuke.

jakubjezek001 commented 6 years ago
import os
for key, value in os.environ.items():
    if "PYBLISH_QML_PYTHON_EXECUTABLE" in key:
        print(key,value)
# Result: ('PYBLISH_QML_PYTHON_EXECUTABLE', 'C:\\Users\\Public\\avalon_env\\python.exe')
Traceback (most recent call last):
  File "C:\Users\Public\avalon_env\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Public\avalon_env\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\hubert\CODE\github\avalon-environment\bin\avalon-setup\git\pyblish-qml\pyblish_qml\__main__.py", line 6, in <module>
    from . import app
  File "C:\Users\hubert\CODE\github\avalon-environment\bin\avalon-setup\git\pyblish-qml\pyblish_qml\app.py", line 12, in <module>
    from PyQt5 import QtCore, QtGui, QtQuick, QtTest
ImportError: DLL load failed: The specified procedure could not be found.
for key, value in os.environ.items():
    if "PYBLISH_QML_PYQT5" in key:
        print(key,value)
# Result: ('PYBLISH_QML_PYQT5', 'C:\\Users\\Public\\avalon_env\\Lib\\site-packages\\PyQt5')

Tests:

I presume it is some Nuke's internal incompatibility issue with outside python3 PyQt5 but that is just a guess.

darkvertex commented 6 years ago

What Nuke version? I've opened the Pyblish QML GUI in Nuke no problem in Linux in the past.

jakubjezek001 commented 6 years ago

Hi @darkvertex thanks for question. Its windows 11.2v3. Would you mind to share your config?

darkvertex commented 6 years ago

It's studio stuff using Rez packages that I can't really share, sorry, but it should be possible to accomplish a working pyblish-qml with a conda environment with only Python 2.7, PyQt5, pyblish-base and pyblish-qml and using the PYBLISH_QML_PYTHON_EXECUTABLE env var in Nuke to point to this environment before you use or import the GUI.

It can be a shellscript/.bat that sets the good environment and passes the args straight to the python executable, it doesn't necessarily have to be a path to python.exe itself.

mottosso commented 6 years ago

@jezscha Have you experienced the issue on a different computer or user? Could it be something pre-existing in your particular environment? E.g. multiple Qt installs?

jakubjezek001 commented 6 years ago

@darkvertex I understand. But anyway thanks for the comprehension. In our setting we wish to stick to Python3.6.5, PyQt5==5.7.1 for all integrations if it would be possible. I understand Pyblish-qml in Nuke can be accomplished in Python2.7 and I have already experienced it myself.

@mottosso I have been testing it on two machines which one of them was vanilla and no paths existed in env-vars. Also the second has been cleaned from all traces in env-vars and files and register. I am going to test it on other tomorrow so lets see.

BigRoy commented 5 years ago

@jezscha were you able to make progress with this the way you wanted?