Python Compatibility
Workspace/Transformer Parameters > Scripting> Python Compatibility
This parameter specifies the level of compatibility your workspace or custom transformer has with different versions of the Python programming language. Python 3.0 introduced significant changes that are not backward compatible with Python 2.x. For more information about these differences, see https://wiki.python.org/moin/Python2orPython3.
FME uses this parameter, in combination with the Preferred Python Interpreter setting in Tools > FME Options > Translation, to choose a Python interpreter when the workspace or custom transformer is run.
If Preferred Python Interpreter is a custom interpreter, FME loads it as long as it is either compatible or potentially compatible with the setting here. In all other scenarios, FME uses another interpreter that is either compatible or potentially compatible with the setting here. On Windows, this is the Python interpreter bundled with FME. On Linux or Mac OS X, it is the Python interpreter installed on your system.
Note: When an interpreter loads that is potentially compatible with this setting, a warning is logged.
Compatibility Levels
- Compatible: Python version x.y is compatible with w.z if x == w and y >= z
- Potentially compatible: Python version x.y is potentially compatible to version w.z if x == w and y < z
- Incompatible: Python version x.y is incompatible with version w.z if x != w
Specifying a Compatibility
- Python 2.7: The workspace or custom transformer is compatible with Python 2.7. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 2.7 or a custom interpreter based on Python 2.7 or lower.
- Python 3.4+: The workspace or custom transformer is compatible with Python 3.4 and higher. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 3.4+ or a custom interpreter based on Python 3.4 or lower.
- Python 3.5+: The workspace or custom transformer is compatible with Python 3.5 and higher. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 3.5+ or a custom interpreter based on Python 3.5 or higher.
- Python 3.6+: The workspace or custom transformer is compatible with Python 3.6 and higher. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 3.6+ or a custom interpreter based on Python 3.6 or higher.
- Python 2.7 or 3.4+: The workspace or custom transformer is compatible with either Python 2.7, or Python 3.4 and higher. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 2.7 or 3.4+. When this value is specified in both places, a Python 2.7 interpreter loads. If this value is only specified here, the interpreter specified by Preferred Python Interpreter loads.
- Esri ArcGIS Desktop (Python 2.7): The workspace or custom transformer is compatible with the Python 2.7 interpreter distributed with ArcGIS for Desktop 10.1 - 10.5. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Desktop Python (2.7).
- Esri ArcGIS Pro 1.3+ (Python 3.4+): The workspace or custom transformer is compatible with the Python 3.4 or higher interpreter distributed with ArcGIS Pro 1.3 or later. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Pro 1.3+ Python (3.4+).
- Esri ArcGIS Pro 1.4/2.0+ (Python 3.5+): The workspace or custom transformer is compatible with the Python 3.5 or higher interpreter distributed with ArcGIS Pro 1.4/2.0 or later. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Pro 1.4/2.0+ Python (3.5+).
- Esri ArcGIS Pro 2.1+ (Python 3.6+): The workspace or custom transformer is compatible with the Python 3.6 or higher interpreter distributed with ArcGIS Pro 2.1 or later. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Pro 2.1+ Python (3.6+).
Scenarios
To run a Python-enabled workspace/custom transformer as optimally as possible on FME Desktop
Leave Python Compatibility at its default setting.
To use a specific Python interpreter, such as a system-specific interpreter with custom modules
Set Preferred Python Interpreter (Tools > FME Options > Translation) to match the Python version of the interpreter.
To run Python code that uses features from a specific version of Python
Set Python Compatibility to the appropriate version of Python.
To ensure the greatest compatibility with other FME Desktop users and/or FME Server.
Leave Python Compatibility at its default setting.
To run Python code that you know is compatible with both Python 2.7 and 3.x, and ensure the greatest compatibility with other FME Desktop users and/or FME Server
Set Python Compatibility to Python 2.7 or 3.4+.