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, and determines the Python interpreter used by FME when running a workspace. 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 loads a Python interpreter that is either compatible or potentially compatible with this setting. If a release of Python 3 is specified on Windows and Mac OS X, this is the Python interpreter bundled with FME, and on Linux, it is the Python interpreter installed on the system. If Python 2.7 is specified on Windows, this is either the optional Python interpreter bundled with FME, if installed, or the Python interpreter installed on the system. On Mac OS X and Linux, Python 2.7 is not supported (see Python 2.7 (removed) under Specifying a Compatibility, below).
On Windows, a custom Python interpreter can be used instead of the interpreter bundled with FME by specifying a custom interpreter for the Preferred Python Interpreter setting in Tools > FME Options > Translation. FME will use that interpreter as long as it is compatible or potentially compatible with the workspace's Python Compatibility setting.
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
Note: Esri ArcGIS Python interpreters are only compatible or potentially compatible with other Esri ArcGIS Python interpreters because they provide guaranteed access to the ArcPy package.
Specifying a Compatibility
- Python 3.8+: The workspace or custom transformer is compatible with Python 3.8 and higher. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is FME Python 3.8+ or a custom interpreter based on Python 3.8 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.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 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.
- Esri ArcGIS Python 3.7: The workspace or custom transformer is compatible with the Python 3.7 interpreter distributed with ArcGIS Pro 2.7, ArcGIS Pro 2.8, and ArcGIS Server 10.9. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Python 3.7.
- Esri ArcGIS Python 3.6+: The workspace or custom transformer is compatible with the Python 3.6 interpreter distributed with ArcGIS Pro 2.1- 2.6 and ArcGIS Server 10.6 - 10.8. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Python 3.6.
- Esri ArcGIS Python 2.7: The workspace or custom transformer is compatible with the Python 2.7 interpreter distributed with ArcGIS Desktop 10.1 - 10.8 and ArcGIS Server 10.1 - 10.8. This value is the default when Preferred Python Interpreter (Tools > FME Options > Translation) is Esri ArcGIS Python 2.7.
- Python 2.7 (deprecated) (Windows) or Python 2.7 (removed) (Linux and Mac OS X): 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: On Windows, 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. On Linux and Mac OS X, Python 2.7 is not supported. For backward compatibility, this setting allows workspaces that currently rely on Python 2.7 to open. However, to run these workspaces, they must be upgraded for one of the other compatibility settings.
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 Python Compatibility to match the Python version of the custom interpreter specified by the Use Custom Intepreter setting of the Preferred Python Interpreter option (Tools > FME Options > Translation).
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.
To use an Esri ArcGIS Python interpreter to make use of the ArcPy package
Set Python Compatibility to Esri ArcGIS Python 2.7 or one of the settings compatible with the Python 3.x interpreter distributed with ArcGIS Pro.
SourceSansPro-ExtraLightItalic.ttf