I am trying to future proof my Python code, which means I am trying to write code in Python 3. However, from what I understand Draft and the Deadline API were built using Python For .NET. According to the Python For .NET website:
Python for .NET is currently compatible and tested with Python releases 2.7, 3.3, 3.4, 3.5, and 3.6.
Does this mean I can use those packages with Python 3? If not, should I just try to write code that is compatible with Python 2 and 3? Or am I stuck using Python 2.7?
ImportError: Failed to import test module: watermark_unit_tests
Traceback (most recent call last):
File âC:\Program Files\Python36\lib\unittest\loader.pyâ, line 153, in loadTestsFromName
module = import(module_name)
File âR:\WatermarkTool\watermark_unit_tests.pyâ, line 12, in
from watermark import watermark_movie
File âR:\WatermarkTool\watermark.pyâ, line 12, in
import Draft
ImportError: Module use of python27.dll conflicts with this version of Python.
Thanks for the feedback. Currently, Deadline/Draft ships with cPy 2.7 only and we are tracking the progress of other DCC apps as they look towards providing cPy 3.x support. We are also tracking the VFX Platform community as they look to lockdown CY2019 spec and agree upon a specific version of Py 3.x: vfxplatform.com/ An active discussion is taking place around Py 3.6 / 3.7.
I would recommend writing with compatibility in mind, using âfutureâ imports where practical, thereby making the transition to Py 3 easy for you, when Deadline starts to offer it:
[code]from future import print_function
print(âprint statements are now encapsulatedâ)[/code]
Team is very aware of the need for Python 3 and itâs very much on the roadmap. ETA: not sure.
Any particular requests for Python3 or anything we should be aware of?
Cool, thanks !
What would help us a lot is being able to write events and plugins in python 3 (for anything not directly DCC related, like chat integration, emails etc⌠we are stuck with old libs since many non M&E projects have dropped python 2 support a while ago
+1 from me. I only noticed that this is an issue because I couldnât get Deadline to work with the Py3 Build from Houdini. Currently, they are offering Py2 and Py3 builds for all releases but Iâm unsure for how long they will support Py2.