FME Form: 2024.1

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.

FME loads a Python interpreter that is either compatible or potentially compatible with this setting. On Windows and Mac OS X, this is a Python 3.10 interpreter bundled with FME, and on Linux, it is the Python interpreter installed on the system.

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 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.

Backward Compatibility

If a workspace was created in a previous version of FME Workbench with Python Compatibility set to Python 2.7 or Esri ArcGIS Python 2.7, one of the following occurs when the workspace is opened:

  • If the workspace does not contain user-defined Python, Python Compatibility automatically updates to the latest supported Python version.
  • If the workspace contains user-defined Python, a warning displays to inform you that Python Compatibility will automatically update to the latest supported Python version, which may cause unexpected behavior at workspace runtime.

Custom transformers with Python Compatibility set to Python 2.7 or Esri ArcGIS Python 2.7 must be manually updated to a supported setting before embedding or linking in a workspace.

Note  Python 3.0 introduced significant changes that are not backward compatible with Python 2.x. For more information, see https://wiki.python.org/moin/Python2orPython3.

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

The table below lists the Python versions and compatibility values in FME Workbench.

Tip  The Preferred Python Interpreter option is in Tools > FME Options > Translation.

Python version

The workspace or custom transformer is compatible with:

Preferred Python Interpreter Value

Python 3.12+

Python 3.12 and higher

FME Python 3.12+ or a custom interpreter based on Python 3.12 or higher

Python 3.11+

Python 3.11 and higher

FME Python 3.11+ or a custom interpreter based on Python 3.11 or higher

Python 3.10+

Python 3.10 and higher

FME Python 3.10+ or a custom interpreter based on Python 3.10 or higher

Python 3.9+

Python 3.9 and higher

FME Python 3.9+ or a custom interpreter based on Python 3.9 or higher

Python 3.8+

Python 3.8 and higher

FME Python 3.8+ or a custom interpreter based on Python 3.8 or higher

Esri ArcGIS Python 3.9

Python 3.9 interpreter distributed with ArcGIS Pro 3.0 and ArcGIS Server 11

Esri ArcGIS Python 3.9

Scenarios

To run a Python-enabled workspace/custom transformer as optimally as possible on FME Form

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 Form users and/or FME Flow.

Leave Python Compatibility at its default setting.

To use an Esri ArcGIS Python interpreter to make use of the ArcPy package

Set Python Compatibility to one of the settings compatible with the Python 3.x interpreter distributed with ArcGIS Pro.