This is most likely an uncommon use case, but I thought I’d ask anyway.
In a custom Deadline submission window I’ve made that gets created using deadlinecommand -ExecuteScript, I’m trying to use subprocess.Popen to run a Python script via Nuke’s Python interpreter. Essentially, I’m using subprocess.Popen, to run the command /Applications/Nuke8.0v1/Nuke8.0v1.app/Contents/MacOS/python2.7 /Volumes/some/path/mov_codecs.py. If I run this command straight in the Terminal, it works fine. If I use subprocess with the version of Python that comes with the Mac, it works. If I run it with Deadline Python, it does NOT work…but only on Mac. It still works on Windows 7. I get the error:
import nuke
ImportError: No module named nuke
It looks like Deadline Python clears sys.path causing it to be impossible to run Python scripts with the Nuke interpreter. Any advice is greatly appreciated.
I’m running this with Deadline 6.1.
Apologies for not getting an answer to this sooner. As I understand it, Deadline should reset everything to the system defaults for Python as soon as it is done loading the client apps, so it should work, but I will have to check with our devs to see what might be happening here.