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 3.7+: The workspace or custom transformer is compatible with Python 3.7 and higher. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 3.7+ or a custom interpreter based on Python 3.7 or higher.
- Python 2.7 and 3: The workspace or custom transformer is compatible with Python 2.7 and Python 3.5 and higher. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 2.7 or 3. When this value is specified in both places, a Python 3.x interpreter loads, where x is the latest FME-supported minor version. If this value is only specified here, the interpreter specified by Preferred Python Interpreter loads.
- 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 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.
- Esri ArcGIS Pro 2.1 - 2.4 (Python 3.6): The workspace or custom transformer is compatible with the Python 3.6 interpreter distributed with ArcGIS Pro 2.1- 2.4. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Pro 2.1 - 2.4 Python (3.6).
- 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 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.7. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Desktop Python (2.7).
- Python 2.7 (deprecated): 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.
Note: This setting has been deprecated. It is no longer being maintained and will likely be removed in a future version of FME. Avoid using this setting in new development work, and plan to modify workspaces that currently use it.
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 and 3.