IBM Support

Getting an error running a demo python extension output node

Troubleshooting


Problem

I run a stream from https://www.ibm.com/docs/es/spss-modeler/18.6.0?topic=spark-native-python-apis . I first run the node that updates/installs scikit-learn.
I get an error:
ValueError: numpy.dtype size changed

Cause

This is due to the fact that scikit-learn has dependencies, and installing these dependencies actually updates an existing library (numpy), which can cause Modeler to fail in other python calls that involve numpy, as it is expected to have a lower version. (e.g. pandas needs a lower numpy version)

Resolving The Problem

1.  list the installed python packages to see if there are compatibility issues.
c:\Program Files\IBM\SPSS\Modeler\18.6\python_venv\Scripts>python.exe -m pip list
Package Version


joblib 1.5.1
numpy 2.2.6
pandas 1.4.3
pip 22.2.2
python-dateutil 2.8.2
pytz 2022.7.1
scikit-learn 1.7.1
scipy 1.15.3
setuptools 63.2.0
six 1.16.0
threadpoolctl 3.6.0
WARNING: There was an error checking the latest version of pip.

You're using:
NumPy 2.2.6
Pandas 1.4.3

These versions are not compatible with each other, and specifically:
Pandas 1.4.3 is not officially compatible with NumPy 2.2.6.

2. Installed numpy 1.21.6 which is compatible with pandas 1.4.3
c:\Program Files\IBM\SPSS\Modeler\18.6\python_venv\Scripts>python.exe -m pip install numpy-1.21.6-cp310-cp310-win_amd64.whl
Processing c:\program files\ibm\spss\modeler\18.6\python_venv\scripts\numpy-1.21.6-cp310-cp310-win_amd64.whl
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 2.2.6
Uninstalling numpy-2.2.6:
Successfully uninstalled numpy-2.2.6
scipy 1.15.3 requires numpy<2.5,>=1.23.5, but you have numpy 1.21.6 which is incompatible.
scikit-learn 1.7.1 requires numpy>=1.22.0, but you have numpy 1.21.6 which is incompatible.
Successfully installed numpy-1.21.6

c:\Program Files\IBM\SPSS\Modeler\18.6\python_venv\Scripts>


 

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS3RA7","label":"IBM SPSS Modeler"},"ARM Category":[{"code":"a8m3p0000006xr6AAA","label":"SPSS Modeler"}],"ARM Case Number":"TS019787143","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"16.0.0;17.0.0;18.0.0;18.1.0;18.2.0;18.2.1;18.2.2;18.3.0;18.4.0;18.5.0;18.6.0"}]

Document Information

Modified date:
14 August 2025

UID

ibm17242249