Transformations > Python transformation > Installing and configuring Python
  

Installing and configuring Python

To use the Python transformation with additional libraries, the runtime environment must have access to an installation of Python and the resource files that you reference in the Python code. When you install Python, you can include any third-party libraries such as numpy, scikit-learn, and cv2. You can access the third-party libraries in the Python code.
If you have a custom Python installation, you cannot perform a test run of the mapping. You must create a mapping task based on the elastic mapping and provide advanced.custom.property for the advanced session property.
Install Python and add resource files based on the type of runtime environment:
Runtime environment
Add the Python installation in the following directory on the Secure Agent machine:
<Secure Agent installation directory>/ext/python/
If you reference resource files in the Python code, add the resource files to the same directory. To maintain consistency, you can store the resource files in a dedicated folder named python_resources.
Consider the following guidelines:
Serverless runtime environment
Install Python and add resource files in the supplementary file location.
If you update the Python installation or resource files, you must redeploy the serverless runtime environment for the changes to take effect.
For more information about the supplementary file location, see Administrator in the Administrator help.