Maya on Windows and Linux is packaged with both Python 3 and Python 2 interpreters. Maya for macOS is packaged with only the Python 3 interpreter.
Maya on Windows and Linux starts in Python 3 mode by default. It can be switched to Python 2 mode by either using the -pythonver 2 option when starting Maya from the command line, or by setting the MAYA_PYTHON_VERSION environment variable to 2 before starting Maya from the command line.
Platform | Command | Environment variable |
---|---|---|
Windows | maya.exe -pythonver 2 |
C:\>set MAYA_PYTHON_VERSION=2
C:\>maya.exe |
Linux | maya -pythonver 2 |
[~]$ export MAYA_PYTHON_VERSION=2
[~]$ maya |