Solved

Is Python 3.8 supported yet?

  • 24 April 2022
  • 3 replies
  • 109 views

Userlevel 7
Badge +3

Hi peeps,

In the Python Standalone application, the comments say:

#    1. Ensure you are running Python 3.4, 3.5, 3.6, or 3.7. PythonNET does not work with Python 3.8 yet.

If I look at  the PythonNet Git I see

Python.NET is currently compatible and tested with Python releases 2.7 and 3.5-3.8. 

Can you confirm whether Python 3.8 is supported by OpticStudio? I know I can just try it and find out, but I want to avoid problems that only become apparent later 😀

  • Mark

 

icon

Best answer by MichaelH 25 April 2022, 17:56

View original

3 replies

Userlevel 6
Badge +2

Hey Mark,

Yes, Python 3.8 is now supported.  The module behind the scene which actually communicates between Python and the ZOS-API is a module called pythonnet; Zemax itself does not have any special code to handle new versions of Python.  When the templates were first created, this module itself did not support Python 3.8 so we couldn't support it in the templates.  Since then, pythonnet has updated to work with Python 3.8.  For future releases of Python, the compatibility will be based on when pythonnet itself supports the new version:

https://pypi.org/project/pythonnet/

Userlevel 7
Badge +3

Thanks Michael. It would help if the template comment was updated, I think.

Userlevel 6
Badge +2

Thank you Mark and Michael! I’ll ask the developers if this can be removed.

One of our KBAs was not updated either so now it is done.

Reply