Installing Python Packages to FME Desktop
If you want workspaces to reference custom Python modules that are part of a Python package, you must:
- Install a custom Python interpreter.
- Install the pip package management system.
- Use pip to install the package to FME Desktop.
Note: The default interpreter included with FME is not available for Python packages because installing pip to that interpreter requires modifications to the FME installation directory, which is not recommended.
Installing a Custom Python Interpreter
- Install a Python 2.7 interpreter from https://www.python.org/downloads/.
- Ensure the installation path of the interpreter is added to the PATH environment variable.
- To get pip, securely download the contents of https://bootstrap.pypa.io/get-pip.py.
- From a command prompt, navigate to the directory to which get-pip.py was downloaded.
- Run the command:
> python get-pip.py
Installing Python Packages
To install a package, run the following command:
> python -m pip install <package_name> --target C:\Users\<user>\Documents\FME\Plugins\Python
For example, to install a package named PyExecJS:
> python -m pip install PyExecJS --target C:\Users\<user>\Documents\FME\Plugins\Python
Note: Substitute <user> with the Windows user name.