Overview

The IBM® SPSS® Statistics - Integration Plug-in for Python provides two interfaces for programming with the Python language within IBM SPSS Statistics on Windows, Linux, macOS, and for IBM SPSS Statistics Server.

Python Integration Package
The Python Integration Package provides functions that operate on the IBM SPSS Statistics processor, extending IBM SPSS Statistics command syntax with the full capabilities of the Python programming language. With this interface, you can access IBM SPSS Statistics variable dictionary information, case data, and procedure output. You can submit command syntax to IBM SPSS Statistics for processing, create new variables and new cases in the active dataset, or create new datasets. You can also create output in the form of pivot tables and text blocks, all from within Python code.
Scripting Facility
The Scripting Facility provides Python functions that operate on user interface and output objects. With this interface, you can customize pivot tables, and export items such as charts and tables in various formats. You can also start IBM SPSS Statistics dialog boxes, and manage connections to instances of IBM SPSS Statistics Server, all from within Python code.

The IBM SPSS Statistics - Integration Plug-in for Python is a part of the IBM SPSS Statistics product. It also includes Python 3.10 on all supported operating systems (Windows, Linux, macOS, and UNIX for IBM SPSS Statistics Server) and a set of extension commands that are implemented in Python that provide capabilities beyond what is available with built-in SPSS Statistics procedures.

By default, the Integration Plug-in for Python uses the Python 3.10 distribution that are installed with your IBM SPSS Statistics product. The distribution is installed to the Python3 directory under the directory where SPSS Statistics is installed. You can specify to use a different installation of Python 3.10 on the File Locations tab on the Options dialog (Edit>Options). In distributed analysis mode (requires IBM SPSS Statistics Server), the Python location on the remote server is set from the IBM SPSS Statistics Administration Console. Contact your system administrator for assistance.

Note: The locations for extension commands that are listed in the output from the SHOW EXTPATHS command are added to the Python search path when you are accessing Python from within IBM SPSS Statistics. If you develop your own Python modules for use with IBM SPSS Statistics on your computer then you can store your modules in one of those locations.

Refer to the following introductory video for a brief overview on Python programmability enhancements: