About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Last updated: Feb 11, 2025
SPSS Modeler supports Python scripts for Apache Spark.
Note:
- Python nodes depend on the Spark environment.
- Python scripts must use the Spark API because data is presented in the form of a Spark DataFrame.
- When installing Python, make sure all users have permission to access the Python installation.
- If you want to use the Machine Learning Library (MLlib), you must install a version of Python that includes NumPy.
Tips
You can run the following Python scripts from an Extension Output node:
- To view information about the distribution of Python included with SPSS Modeler:
import sys sys.version
- To list all installed Python packages:
import subprocess subprocess.check_call([sys.executable, '-m', 'pip', 'list'])
- To install Python packages from an air-gapped environment, use the
option which allows--index-url
to install packages from a given Python repository (the repository must be compliant with PEP 503). For more information, including a list of all options, see https://pip.pypa.io/en/stable/cli/pip_install/.pip
Was the topic helpful?
0/1000