You are here: Administrator's Guide > Other Common Tasks > Configuring the FME Engine > Using Python with FME Server

Using Python with FME Server

Configuring a Custom Python Interpreter

Windows

On Windows systems, FME installs its own Python interpreter, which is used by any scripts that run Python in FME. If you want FME to use your own custom Python interpreter, run the following commands from a command prompt:

Note: To avoid errors, the Windows Command Prompt must likely be run as administrator, even if you are currently running your machine with administrator privileges. From the Start Menu, right-click on Command Prompt and select Run as administrator.

  • <FMEServerDir>Server/fme/fme.exe APPLY_SETTINGS SYSTEM "Python/Use Custom Python" true
  • <FMEServerDir>Server/fme/fme.exe APPLY_SETTINGS SYSTEM "Python/Python Interpreter" c:/<path_to_dll>/python27.dll

Linux

On Linux, FME uses the Python module that is installed with the system. To use your own Python module in FME, configure it with the system Python:

  • <FMEServerDir>Server/fme/fme APPLY_SETTINGS SYSTEM "Python/Use Custom Python" true
  • <FMEServerDir>Server/fme/fme APPLY_SETTINGS SYSTEM "Python/Python Interpreter" /<path>/libpython2.7.so

Uploading Python Modules to FME Server

If you have a Python module you need to use on FME Server which is not part of the Python standard library, use the Upload tool on the Resources page of the Web User Interface, and upload it to the folder under Engine\Plugins\python that corresponds to the Python release compatible with the module (for example, python27).